home *** CD-ROM | disk | FTP | other *** search
/ Explore the World of Soft…ids, Adults, Educational / RocelcoInc-ExploreTheWorldOfSoftware-KidsAdultsEducational-Vol2-Shareware.iso / educate / disk057 / guess_1.bas < prev    next >
Encoding:
BASIC Source File  |  1984-03-15  |  640 b   |  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