Add fizzbuzz source
Next goal will be, to implement enough to make this work
This commit is contained in:
parent
44e585fca2
commit
1a58f3b7af
12
source_files/schala/fizzbuzz.schala
Normal file
12
source_files/schala/fizzbuzz.schala
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
for n <- 1..=100 {
|
||||||
|
if n % 15 == 0 {
|
||||||
|
print("FizzBuzz")
|
||||||
|
} else if n % 5 == 0 {
|
||||||
|
print("Buzz")
|
||||||
|
} else if n % 3 == 0 {
|
||||||
|
print("Fizz")
|
||||||
|
} else {
|
||||||
|
print(n.to_string())
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user