Skip to content

Instantly share code, notes, and snippets.

@KOBA789
Created September 3, 2010 14:45
Show Gist options
  • Save KOBA789/563966 to your computer and use it in GitHub Desktop.
Save KOBA789/563966 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main (void) {
int i, foo, bar, flg;
foo = bar = 0;
for (i = 1; i <= 100; i++) {
flg = 0;
foo++;
bar++;
if (foo == 3) {
foo = 0;
flg = 1;
printf("Fizz");
}
if (bar == 5) {
bar = 0;
flg = 1;
printf("Buzz");
}
if (!flg) {
printf("%d", i);
}
printf("\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment