millfork/examples/crossplatform/fizzbuzz.mfk

23 lines
421 B
Plaintext

// memorize this code for your next interview for a Millfork developer position
import stdio
void main() {
byte i
for i,1,to,100 {
if i %% 15 == 0 {
putstrz("fizzbuzz"z)
} else if i %% 3 == 0 {
putstrz("fizz"z)
} else if i %% 5 == 0 {
putstrz("buzz"z)
} else {
putword(i)
}
putchar(' ')
}
while(true){}
}