fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. var Fz = "FIZZ", Bz = "BUZZ", Cnt = 0;
  5. while (Cnt < 100) {
  6. Cnt = Cnt + 1;
  7. if (Cnt %3 == 0 && Cnt %5 == 0) {
  8. console.log(Fz + Bz);
  9. }
  10. else if (Cnt % 3 == 0) {
  11. console.log(Fz);
  12. }
  13. else if (Cnt % 5 == 0) {
  14. console.log(Bz);
  15. }
  16. else if (Cnt % 3 != 0 && Cnt % 5 != 0) {
  17. console.log(Cnt);
  18. }
  19. }
  20.  
  21. // your code goes here
  22.  
Success #stdin #stdout 0.14s 52064KB
stdin
Standard input is empty
stdout
1
2
FIZZ
4
BUZZ
FIZZ
7
8
FIZZ
BUZZ
11
FIZZ
13
14
FIZZBUZZ
16
17
FIZZ
19
BUZZ
FIZZ
22
23
FIZZ
BUZZ
26
FIZZ
28
29
FIZZBUZZ
31
32
FIZZ
34
BUZZ
FIZZ
37
38
FIZZ
BUZZ
41
FIZZ
43
44
FIZZBUZZ
46
47
FIZZ
49
BUZZ
FIZZ
52
53
FIZZ
BUZZ
56
FIZZ
58
59
FIZZBUZZ
61
62
FIZZ
64
BUZZ
FIZZ
67
68
FIZZ
BUZZ
71
FIZZ
73
74
FIZZBUZZ
76
77
FIZZ
79
BUZZ
FIZZ
82
83
FIZZ
BUZZ
86
FIZZ
88
89
FIZZBUZZ
91
92
FIZZ
94
BUZZ
FIZZ
97
98
FIZZ
BUZZ