|
Re: Just Starting Programming
You didnt reinput the answer variable after some of the questions.
I also do not remeber if you can redefine strings like this in Qbasic so if this does not work you need to change each answer into a diffrent vairable.
==========================================================
CLS
PRINT "How are You?"
INPUT answer$
IF LCASE$(answer$) = "good" THEN
PRINT "thats good"
ELSE
IF LCASE$(answer$) = "bad" THEN
PRINT "why?"
ELSE
PRINT "what the hell?"
END IF
END IF
PRINT "what are you doing today?"
INPUT answer$
IF LCASE$(answer2$) = "listening to music" THEN
PRINT "cool, what type of music are you into"
END IF
INPUT answer$
IF LCASE$(answer2$) = "electronic" THEN
PRINT "no way!!!! me too!"
END IF
PRINT "hmmm, which artists do you like?"
INPUT answer$
IF LCASE$(answer$) = "sonic animation"
or "prodigy"
or "the prodigy"
or "hybrid"
or "moby"
or "crystal method"
or "chemical brothers" THEN
PRINT "yep! good stuff"
END IF
PRINT "so whats your favourite choon?"
INPUT answer$
IF LCASE$(answer$) = "music response"
==========================================================
also you want to change the UCASE$ to LCASE$ since you are using lower case strings to compair too.
example:
answer$ = "foo"
UCASE$(answer$) will return FOO
answer$ = "$BAR"
LCASE($answer$) will return bar
you also did not end most of your IF statments.
|