docs(examples): add example programs
This commit is contained in:
1 parent
022cea25e3
commit
f72f9d0c29
7 files changed
+200
No files matched your search
@@ -0,0 +1,13 @@
|
||||
// Classic FizzBuzz for the numbers 1 through 15.
|
||||
|
||||
for (n in range(1, 16)) {
|
||||
if (n % 15 == 0) {
|
||||
println("FizzBuzz")
|
||||
} else if (n % 3 == 0) {
|
||||
println("Fizz")
|
||||
} else if (n % 5 == 0) {
|
||||
println("Buzz")
|
||||
} else {
|
||||
println(str(n))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user