Skip to content

Instantly share code, notes, and snippets.

@ginkgo
Last active December 26, 2015 19:29
Show Gist options
  • Save ginkgo/7201708 to your computer and use it in GitHub Desktop.
Save ginkgo/7201708 to your computer and use it in GitHub Desktop.
#include "stdio.h"
int main(void)
{
int i = 1;
for (;;) {
printf("%d\n", i++); // 1
printf("%d\n", i++); // 2
printf("fizz\n", i++); // 3
printf("%d\n", i++); // 4
printf("buzz\n", i++); // 5
printf("fizz\n", i++); // 6
printf("%d\n", i++); // 7
printf("%d\n", i++); // 8
printf("fizz\n", i++); // 9
printf("buzz\n", i++); // 10
if (i > 100) break;
printf("%d\n", i++); // 11
printf("fizz\n", i++); // 12
printf("%d\n", i++); // 13
printf("%d\n", i++); // 14
printf("fizzbuzz\n",i++); // 15
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment