Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Guess-the-number/NetRexx/guess-the-number.netrexx
Normal file
23
Task/Guess-the-number/NetRexx/guess-the-number.netrexx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* NetRexx */
|
||||
|
||||
options replace format comments java crossref savelog symbols nobinary
|
||||
|
||||
guessThis = (Math.random * 10 + 1) % 1
|
||||
guess = -1
|
||||
prompt = [ -
|
||||
'Try guessing a number between 1 and 10', -
|
||||
'Wrong; try again...' -
|
||||
]
|
||||
promptIdx = int 0
|
||||
|
||||
loop label g_ until guess = guessThis
|
||||
say prompt[promptIdx]
|
||||
promptIdx = 1
|
||||
parse ask guess .
|
||||
if guess = guessThis then do
|
||||
say 'Well guessed!' guess 'is the correct number.'
|
||||
leave g_
|
||||
end
|
||||
end g_
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue