Skip to content

Instantly share code, notes, and snippets.

@antifuchs
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antifuchs/69a679db0b853b7dbb8e to your computer and use it in GitHub Desktop.
Save antifuchs/69a679db0b853b7dbb8e to your computer and use it in GitHub Desktop.
I am a monster & very sorry. Also, this is unlikely to be correct.
#include <stdio.h>
int main ()
{
int three = 3, five = 5;
int i;
for (i = 0; i < 20; i++) {
if (i != three && i != five) {
printf("%d\n", i);
continue;
}
if (i == three) {
three += 3;
printf("Fizz");
}
if (i == five) {
five += 5;
printf("Buzz");
}
putchar('\n');
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment