Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
22
Task/Nim-game/Minimal-BASIC/nim-game.basic
Normal file
22
Task/Nim-game/Minimal-BASIC/nim-game.basic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
10 LET H = 12
|
||||
20 PRINT "There are"
|
||||
30 PRINT H
|
||||
40 PRINT "tokens remaining. How many would you like to take?"
|
||||
50 INPUT T
|
||||
60 IF T > 3 THEN 170
|
||||
70 IF T < 1 THEN 170
|
||||
80 LET H = H - T
|
||||
90 IF H = 0 THEN 190
|
||||
100 LET T = 4 - T
|
||||
110 PRINT "I will take"
|
||||
120 PRINT T
|
||||
130 PRINT "tokens."
|
||||
140 LET H = H - T
|
||||
150 IF H = 0 THEN 210
|
||||
160 GOTO 20
|
||||
170 PRINT "You must take 1, 2, or 3 tokens."
|
||||
180 GOTO 50
|
||||
190 PRINT "Congratulations. You got the last token."
|
||||
200 GOTO 220
|
||||
210 PRINT "I got the last token. I win. Better luck next time."
|
||||
220 END
|
||||
Loading…
Add table
Add a link
Reference in a new issue