Skip to content

Instantly share code, notes, and snippets.

@jeksys
Created July 18, 2012 13:33
Show Gist options
  • Save jeksys/3136241 to your computer and use it in GitHub Desktop.
Save jeksys/3136241 to your computer and use it in GitHub Desktop.
FizzBuzz
int main() {
for( int i=1; i<=100; i++)
{
if(i%3==0)
printf("Fizz");
if(i%5==0)
printf("Buzz");
if(i%3!=0 && i%5!=0)
printf("%d",i);
printf("\n");
}
return 0;
}
http://c2.com/cgi/wiki?FizzBuzzTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment