1
0
dust/examples/fizzbuzz.ds
2024-03-25 01:56:06 -04:00

19 lines
312 B
Plaintext

count = 1
while count <= 15 {
divides_by_3 = count % 3 == 0
divides_by_5 = count % 5 == 0
if divides_by_3 && divides_by_5 {
io.write_line('fizzbuzz')
} else if divides_by_3 {
io.write_line('fizz')
} else if divides_by_5 {
io.write_line('buzz')
} else {
io.write_line(count)
}
count += 1
}