Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Nim-game/True-BASIC/nim-game.basic
Normal file
18
Task/Nim-game/True-BASIC/nim-game.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
LET monton = 12
|
||||
LET llevar = 0
|
||||
|
||||
DO WHILE monton > 0
|
||||
PRINT "Quedan"; monton; "fichas. ¿Cuántas te gustaría tomar";
|
||||
INPUT llevar
|
||||
DO WHILE llevar = 0 Or llevar > 3
|
||||
PRINT "Debes tomar 1, 2, o 3 fichas. ¿Cuántas te gustaría tomar";
|
||||
INPUT llevar
|
||||
LOOP
|
||||
|
||||
PRINT "Es mi turno, tomaré"; 4-llevar; "ficha(s)."
|
||||
LET monton = monton - 4
|
||||
LOOP
|
||||
|
||||
PRINT
|
||||
PRINT "Obtuve la última ficha. ¡Gané! Mejor suerte la próxima vez."
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue