one-file-projects/fizzbuzz.c
2014-08-31 06:14:41 +02:00

17 lines
339 B
C

#include <stdio.h>
int main() {
int i;
for(i = 1; i <= 100; i++) {
if(i % 15 == 0) {
printf("FizzBuzz\n");
} else if(i % 3 == 0) {
printf("Fizz\n");
} else if(i % 5 == 0) {
printf("Buzz\n");
} else {
printf("%d\n",i);
}
}
return 0;
}