Skip to content

Commit

Permalink
add normal fizzbuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
sato-makoto committed Oct 9, 2017
1 parent d2d0d72 commit 754aa62
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions foolish_fizzbuzz/normal.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include<stdio.h>
int main()
{
int i;
#define LIMIT 100000000
for(i=1; i<=LIMIT; i++) {
if(i%15 == 0) {
printf("fizzbuzz\n");
} else if(i%3 == 0) {
printf("fizz\n");
} else if(i%5 == 0) {
printf("buzz\n");
} else{
printf("%d\n", i);
}
}
return 0;
}

0 comments on commit 754aa62

Please sign in to comment.