Advertisement
Guest User

My First Nim Program (I'm Cider)

a guest
Sep 7th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.66 KB | None | 0 0
  1. # A comment
  2. # Made By Cider :D
  3. var YourName, Answer: string
  4.  
  5. echo "What's your name?"
  6.  
  7. YourName = readLine(stdin)
  8.  
  9. while YourName == "":
  10.   echo "Please tell me your name"
  11.   YourName = readLine(stdin)
  12.  
  13. echo "Thanks ", YourName
  14.  
  15. echo YourName, " would you like to count to ten?"
  16.  
  17. Answer = readLine(stdin)
  18.  
  19. while true:
  20.   case Answer
  21.   of "y", "Y", "yes", "Yes":
  22.     echo "Okay ", YourName, " :D, look"
  23.     for i in countup(1, 10):
  24.       echo i
  25.     echo "Hope you had fun :D, Bye <3"
  26.     break
  27.   of "n", "N", "no", "No":
  28.     echo "Okay ", YourName, " :), Bye <3"
  29.     break
  30.   else:
  31.     echo "Please tell me yes or no"
  32.     Answer = readLine(stdin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement