Borderou de evaluare (job #751527)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Control (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 16 dec. 2023 11:32:24 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int prim(int)':
main.cpp:10:27: error: 'm' was not declared in this scope
10 | for(int d = 1; d*d <= m; d++)
| ^
main.cpp:11:24: error: 'nr' was not declared in this scope
11 | if(m % d == 0) nr += 2;
| ^~
main.cpp:12:8: error: 'nr' was not declared in this scope
12 | if(nr == 2) return << "1";
| ^~
main.cpp:12:24: error: expected primary-expression before '<<' token
12 | if(nr == 2) return << "1";
| ^~
main.cpp:13:17: error: expected primary-expression before '<<' token
13 | else return << "0";
| ^~
main.cpp:9:9: warning: unused variable 'd' [-Wunused-variable]
9 | int d;
| ^
main.cpp: In function 'int main()':
main.cpp:30:24: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses]
30 | if((fr[i] % 2) == (fr[i+1] % 2) == (fr[i+1] % 2))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~