24 lines
304 B
Plaintext
24 lines
304 B
Plaintext
use std.io
|
|
|
|
count = 1
|
|
|
|
while count <= 15 {
|
|
divides_by_3 = count % 3 == 0
|
|
divides_by_5 = count % 5 == 0
|
|
|
|
output = if divides_by_3 && divides_by_5 {
|
|
'fizzbuzz'
|
|
} else if divides_by_3 {
|
|
'fizz'
|
|
} else if divides_by_5 {
|
|
'buzz'
|
|
} else {
|
|
count as str
|
|
}
|
|
|
|
io.write_line(output)
|
|
|
|
count += 1
|
|
}
|
|
|