mirror of
https://github.com/QB64Official/qb64.git
synced 2024-09-28 11:17:47 +00:00
25 lines
No EOL
697 B
QBasic
25 lines
No EOL
697 B
QBasic
RANDOMIZE TIMER
|
|
a = INT(RND * 50)
|
|
CLS
|
|
PRINT "This is a guessing game between the numbers 0 and 50."
|
|
PRINT "I will tell you if you are higher orlower."
|
|
PRINT "Now lets begin!"
|
|
PRINT "type 999 to end (just in case...)"
|
|
WHILE iput <> a
|
|
INPUT "Type in a number please. ", iput
|
|
IF iput = 999 GOTO loser
|
|
IF iput < a THEN PRINT "You are below sea level (that means you're too low!)"
|
|
IF iput > a THEN PRINT "You are burning in the sun! (That means too high!)"
|
|
WEND
|
|
PRINT "Great job! You got it! The number was "; a
|
|
END
|
|
loser:
|
|
PRINT "The number was "; a
|
|
PRINT "Come back and play again soon! :-)"
|
|
PRINT
|
|
PRINT
|
|
PRINT
|
|
PRINT
|
|
PRINT "(C) 2004 John Mendoza"
|
|
PRINT "ALL RIGHTS RESERVED"
|
|
END |