diff --git a/FizzBuzzTernary.c b/FizzBuzzTernary.c new file mode 100644 index 0000000..d4be239 --- /dev/null +++ b/FizzBuzzTernary.c @@ -0,0 +1,7 @@ +#include + +int main(void) +{ + for(int i = 0; i < 100; i++) + i % 3 == 0 && i % 5 == 0 ? printf("FizzBuzz\n") : i % 3 == 0 ? printf("Fizz\n") : i % 5 == 0 ? printf("Buzz\n") : printf("%i\n", i); +}