Skip to content

Instantly share code, notes, and snippets.

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