Borderou de evaluare (job #654476)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Ecuatie2 (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 6 iul. 2022 12:17:49 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:12:13: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[100]' [-Wformat=]
12 | scanf("%s", &s);
| ~^ ~~
| | |
| | char (*)[100]
| char*
main.cpp:21:13: error: 'q' was not declared in this scope
21 | q=2;
| ^
main.cpp:25:13: error: 'q' was not declared in this scope
25 | q=4;
| ^
main.cpp:29:13: error: 'q' was not declared in this scope
29 | q=6;
| ^
main.cpp:33:13: error: 'q' was not declared in this scope
33 | q=8;
| ^
main.cpp:41:13: error: 'q' was not declared in this scope
41 | q=1;
| ^
main.cpp:45:13: error: 'q' was not declared in this scope
45 | q=3;
| ^
main.cpp:49:13: error: 'q' was not declared in this scope
49 | q=5;
| ^
main.cpp:53:13: error: 'q' was not declared in this scope
53 | q=7;
| ^
main.cpp:11:9: warning: unused variable 'a' [-Wunused-variable]
11 | int a,x,b,i,n;
| ^
main.cpp:11:11: warning: unused variable 'x' [-Wunused-variable]
11 | int a,x,b,i,n;
| ^
main.cpp:11:13: warning: unused variable 'b' [-Wunused-variable]
11 | int a,x,b,i,n;
| ^
main.cpp:9:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | freopen("ecuatie.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | freopen("ecuatie.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | scanf("%s", &s);
| ~~~~~^~~~~~~~~~