Problem fizzbuzz
User zsinfo2010
Submission Time 2023-04-14 14:37:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fizzbuzz.cpp: In function ‘int32_t main()’:
fizzbuzz.cpp:8:22: error: expected ‘;’ before ‘<=’ token
8 | for (int i = 1, i<=n; i++) {
| ^~
| ;
fizzbuzz.cpp:8:22: error: expected primary-expression before ‘<=’ token
8 | for (int i = 1, i<=n; i++) {
| ^~
fizzbuzz.cpp:9:29: error: lvalue required as left operand of assignment
9 | if (i % a && i % b =0) {
| ^
fizzbuzz.cpp:20:9: error: expected ‘}’ before ‘else’
20 | else cout<< i << '\n' ;
| ^~~~
fizzbuzz.cpp:17:25: note: to match this ‘{’
17 | else if (i % b) {
| ^
fizzbuzz.cpp: At global scope:
fizzbuzz.cpp:24:1: error: expected declaration before ‘}’ token
24 | }
| ^