home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / GLEN / BASIC1.ZIP / GUESS_1.BAS < prev    next >
BASIC Source File  |  1985-04-03  |  640b  |  11 lines

  1. 10 NUMBER=INT(RND*1000)+1       'pick a random integer between 1 and 1000
  2. 20 PRINT "I know a number between 1 and 1000, try and guess what it is."
  3. 30 INPUT "What is you guess";GUESS
  4. 40 COUNT=COUNT+1                'keep track of the number of guesses
  5. 50 IF NUMBER=GUESS THEN 80      'got it!
  6. 60 IF GUESS<NUMBER THEN PRINT "Too low,"; ELSE PRINT "Too high,";
  7. 70 PRINT " try again ... ";:GOTO 30
  8. 80 PRINT "You got it in";COUNT;"guesses!  Would you like to play again (Y/N)";
  9. 90 INPUT AGAIN$:IF AGAIN$="Y" OR AGAIN$="y" THEN 10
  10. NT "You got it in";COUNT;"guesses!  Would you like to play again (Y/N)";
  11. 90 INPUT AGAIN$:IF AGAIN$="Y" O