fork download
  1. proc GetBottleNumber(n: int): string =
  2. var bs: string
  3. if n == 0:
  4. bs = "No more bottles"
  5. elif n == 1:
  6. bs = "1 bottle"
  7. else:
  8. bs = $n & " bottles"
  9. return bs & " of beer"
  10.  
  11. for bn in countdown(999999999999999999999999999999999999, 1):
  12. var cur = GetBottleNumber(bn)
  13. echo(cur, " on the wall, ", cur, ".")
  14. echo("Take one down and pass it around, ", GetBottleNumber(bn-1), " on the wall.\n")
  15.  
  16. echo "No more bottles of beer on the wall, no more bottles of beer."
  17. echo "Go to the store and buy some more, 99 bottles of beer on the wall."
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nim(11, 20) Error: number 999999999999999999999999999999999999 out of valid range
stdout
Standard output is empty