ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
505 B

  1. 100 REM GUESSING GAME
  2. 120 PRINT "GUESS THE NUMBER BETWEEN 1 AND 100."
  3. 140 LET X = INT(100*RND(0)+1)
  4. 150 LET N = 0
  5. 160 PRINT "YOUR GUESS";
  6. 170 INPUT G
  7. 180 LET N = N+1
  8. 190 IF G = X THEN 300
  9. 200 IF G < X THEN 250
  10. 210 PRINT "TOO LARGE, GUESS AGAIN"
  11. 220 GOTO 160
  12. 250 PRINT "TOO SMALL, GUESS AGAIN"
  13. 260 GOTO 160
  14. 300 PRINT "YOU GUESSED IT, IN"; N; "TRIES"
  15. 310 PRINT "ANOTHER GAME (YES = 1, NO = 0)";
  16. 320 INPUT A
  17. 330 IF A = 1 THEN 140
  18. 340 PRINT "THANKS FOR PLAYING"
  19. 350 END