ORIGINAL-fizz-buzz.sleela
lib/examples/sleela/ORIGINAL-fizz-buzz.sleela · 13 line(s) · sleela
#sleela 1.7
// ORIGINAL: conditions, remainder, and loops.
class OriginalFizzBuzz {
void main() {
for (int n = 1; n <= 15; n = n + 1) {
if (n % 15 == 0) print("FizzBuzz");
else if (n % 3 == 0) print("Fizz");
else if (n % 5 == 0) print("Buzz");
else print(n);
}
}
}