1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 02:20:25 +00:00
QB64-PE/tests/qbasic_testcases/pete/mrguessit.bas
Matthew Kilgore 9ee89d6ff4 Add QBasic tests
These tests use a variety of sample code (with some of the larger files
removed, so they are not complete!) and verifies that they all compile
successfully.
2022-04-28 23:00:07 -04:00

25 lines
673 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