1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-09-04 11:10:15 +00:00
qb64/programs/samples/pete/mrguessit.bas
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

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