Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/FizzBuzz/Gosu/fizzbuzz-1.gosu
Normal file
21
Task/FizzBuzz/Gosu/fizzbuzz-1.gosu
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
for (i in 1..100) {
|
||||
|
||||
if (i % 3 == 0 && i % 5 == 0) {
|
||||
print("FizzBuzz")
|
||||
continue
|
||||
}
|
||||
|
||||
if (i % 3 == 0) {
|
||||
print("Fizz")
|
||||
continue
|
||||
}
|
||||
|
||||
if (i % 5 == 0) {
|
||||
print("Buzz")
|
||||
continue
|
||||
}
|
||||
|
||||
// default
|
||||
print(i)
|
||||
|
||||
}
|
||||
4
Task/FizzBuzz/Gosu/fizzbuzz-2.gosu
Normal file
4
Task/FizzBuzz/Gosu/fizzbuzz-2.gosu
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// note that compiler reports error (I don't know why) but still it's working
|
||||
for (i in 1..100) {
|
||||
print(i % 5 == 0 ? i % 3 == 0 ? "FizzBuzz" : "Buzz" : i % 3 == 0 ? "Fizz" : i)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue