fork download
  1. #include <stdio.h>
  2. int main(int argc, char** argv) {
  3. int i, f, b;
  4. for (i = 1;i <= 100; ++i) {
  5. f = i-i/3*3;
  6. b=i-i/5*5;
  7. (f == 0&&b == 0) ? printf("FizzBazz\n") : (f == 0) ? printf("Fizz\n") :
  8. (b == 0) ? printf("Buzz\n") : printf("%d\n",i);
  9. }
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBazz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBazz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBazz
46
47
Fizz
49
Buzz
Fizz
52
53
Fizz
Buzz
56
Fizz
58
59
FizzBazz
61
62
Fizz
64
Buzz
Fizz
67
68
Fizz
Buzz
71
Fizz
73
74
FizzBazz
76
77
Fizz
79
Buzz
Fizz
82
83
Fizz
Buzz
86
Fizz
88
89
FizzBazz
91
92
Fizz
94
Buzz
Fizz
97
98
Fizz
Buzz