home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
BASIC1.ZIP
/
GUESS_1.BAS
< prev
next >
Wrap
BASIC Source File
|
1985-04-03
|
640b
|
11 lines
10 NUMBER=INT(RND*1000)+1 'pick a random integer between 1 and 1000
20 PRINT "I know a number between 1 and 1000, try and guess what it is."
30 INPUT "What is you guess";GUESS
40 COUNT=COUNT+1 'keep track of the number of guesses
50 IF NUMBER=GUESS THEN 80 'got it!
60 IF GUESS<NUMBER THEN PRINT "Too low,"; ELSE PRINT "Too high,";
70 PRINT " try again ... ";:GOTO 30
80 PRINT "You got it in";COUNT;"guesses! Would you like to play again (Y/N)";
90 INPUT AGAIN$:IF AGAIN$="Y" OR AGAIN$="y" THEN 10
NT "You got it in";COUNT;"guesses! Would you like to play again (Y/N)";
90 INPUT AGAIN$:IF AGAIN$="Y" O