mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 05:53:22 +00:00
Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
14
examples/fizzbuzz.nim
Executable file
14
examples/fizzbuzz.nim
Executable file
@@ -0,0 +1,14 @@
|
||||
# Fizz Buzz program
|
||||
|
||||
const f = "Fizz"
|
||||
const b = "Buzz"
|
||||
for i in 1..100:
|
||||
if i mod 15 == 0:
|
||||
echo f, b
|
||||
elif i mod 5 == 0:
|
||||
echo b
|
||||
elif i mod 3 == 0:
|
||||
echo f
|
||||
else:
|
||||
echo i
|
||||
|
||||
Reference in New Issue
Block a user