You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
239 B
18 lines
239 B
9 years ago
|
/*
|
||
|
* Fizz Buzz
|
||
|
*/
|
||
|
|
||
|
mut i = 1
|
||
|
while i < 24 {
|
||
|
if i % 15 == 0 {
|
||
9 years ago
|
puts('FizzBuzz')
|
||
9 years ago
|
} else if i % 5 == 0 {
|
||
9 years ago
|
puts('Buzz')
|
||
9 years ago
|
} else if i % 3 == 0 {
|
||
9 years ago
|
puts('Fizz')
|
||
9 years ago
|
} else {
|
||
9 years ago
|
puts(i)
|
||
9 years ago
|
}
|
||
|
i = i + 1
|
||
|
}
|