Skip to content

Instantly share code, notes, and snippets.

@yukioc
Created September 18, 2011 16:41
Show Gist options
  • Save yukioc/1225250 to your computer and use it in GitHub Desktop.
Save yukioc/1225250 to your computer and use it in GitHub Desktop.
fizz buzz
#include <stdio.h>
void main(){
int i;
for(i=1;i<100;i++){
if(printf("%s%s",
(i%3==0)?"Fizz":"",
(i%5==0)?"Buzz":"")==0){
printf("%d",i);
}
puts("");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment