Borderou de evaluare (job #742491)

Utilizator avatar Costache_Andrei_paul Costache Andrei Paul Costache_Andrei_paul IP ascuns
Problemă Apropiate1 (clasa a 6-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 4 nov. 2023 15:07:18 Scor 0

Raport evaluator

Eroare de compilare: main.c:3:21: error: expected ']' before ';' token 3 | #define MAXN 4000001; | ^ main.c:4:11: note: in expansion of macro 'MAXN' 4 | char ciur[MAXN]; | ^~~~ main.c: In function 'ciur1': main.c:6:29: error: expected expression before ';' token 6 | for (int i = 2; i < MAXN; i++) { | ^ main.c:7:13: error: 'ciur' undeclared (first use in this function); did you mean 'ciur1'? 7 | if (ciur[i] == 0) { | ^~~~ | ciur1 main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in main.c:8:41: error: expected expression before ';' token 8 | for (int j = i * 2; j < MAXN; j += i) { | ^ main.c: In function 'main': main.c:27:12: error: 'ciur' undeclared (first use in this function); did you mean 'ciur1'? 27 | if(ciur[j]==0){ | ^~~~ | ciur1 main.c:44:27: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] 44 | fscanf(fin, "%d", c1); | ~^ ~~ | | | | | int | int * main.c:47:27: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] 47 | fscanf(fin, "%d", c2); | ~^ ~~ | | | | | int | int * main.c:51:23: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] 51 | fscanf(fin, "%d", c1); | ~^ ~~ | | | | | int | int * main.c:54:23: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=] 54 | fscanf(fin, "%d", c2); | ~^ ~~ | | | | | int | int * main.c:18:11: warning: unused variable 'fout' [-Wunused-variable] 18 | FILE *fout=fopen("apropiate1.out", "w"); | ^~~~