Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
13
Task/Guess-the-number/Nim/guess-the-number.nim
Normal file
13
Task/Guess-the-number/Nim/guess-the-number.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import strutils, math
|
||||
|
||||
randomize()
|
||||
var chosen = 1 + random(10)
|
||||
echo "I have thought of a number. Try to guess it!"
|
||||
|
||||
var guess = parseInt(readLine(stdin))
|
||||
|
||||
while guess != chosen:
|
||||
echo "Your guess was wrong. Try again!"
|
||||
guess = parseInt(readLine(stdin))
|
||||
|
||||
echo "Well guessed!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue