Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <stdio.h>
int main() {
int i;
for (i = 1; i <= 100; i++) {
if ((i % 3) == 0 && (i % 5) == 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.