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.
 
 
 
 
 
 

23 lines
569 B

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