Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Nim-game/BASIC256/nim-game.basic
Normal file
18
Task/Nim-game/BASIC256/nim-game.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
monton = 12
|
||||
llevar = 0
|
||||
|
||||
while monton > 0
|
||||
print "There are "; monton; " tokens remaining. How many would you like to take? ";
|
||||
input integer llevar
|
||||
while llevar = 0 or llevar > 3
|
||||
print "You must take 1, 2, or 3 tokens. How many would you like to take ";
|
||||
input integer llevar
|
||||
end while
|
||||
|
||||
print "On my turn I will take "; 4 - llevar; " token(s)."
|
||||
monton = monton - 4
|
||||
end while
|
||||
|
||||
print
|
||||
print "I got the last token. I win! Better luck next time."
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue