21 lines
328 B
Markdown
21 lines
328 B
Markdown
|
# FizzBuzz
|
||
|
|
||
|
TODO
|
||
|
|
||
|
```
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
for (int i = 1; i <= 100; ++i)
|
||
|
switch ((i % 3 == 0) + (i % 5 == 0) * 2)
|
||
|
{
|
||
|
case 1: printf("Fizz\n"); break;
|
||
|
case 2: printf("Buzz\n"); break;
|
||
|
case 3: printf("FizzBuzz\n"); break;
|
||
|
default: printf("%d\n",i); break;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
```
|