Created
August 28, 2017 08:51
-
-
Save cubapp/b5622813001be9ae0caa1d2ac9fcc896 to your computer and use it in GitHub Desktop.
FizzBuZZ the C way - inspired by http://codepad.org/fizzbuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
int i; | |
for(i=1; i<=100; i++) | |
(i%15)?(i%5)?(i%3)?printf("%d\n",i):printf("Fizz\n"):printf("Buzz\n"):printf("FizzBuzz\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
its so perfect