Borderou de evaluare (job #793012)

Utilizator avatar MATste_08 Stefan Matei Necsulescu MATste_08 IP ascuns
Problemă Furnica (clasa a 6-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 3 nov. 2024 22:12:45 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:9:26: error: expected ';' before 'int' 9 | int firim[MAXn][MAXn] | ^ | ; 10 | int vizite[MAXn][MAXn] | ~~~ main.c:10:27: error: expected ';' before 'int' 10 | int vizite[MAXn][MAXn] | ^ | ; 11 | int direct[8][2] = {{-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}} | ~~~ main.c:12:5: error: expected ',' or ';' before 'int' 12 | int i, j, n, k, directie, moves[MAXk]; | ^~~ main.c:20:29: error: 'n' undeclared (first use in this function) 20 | fscanf (fin, "%d %d", &n, &k); | ^ main.c:20:29: note: each undeclared identifier is reported only once for each function it appears in main.c:20:33: error: 'k' undeclared (first use in this function) 20 | fscanf (fin, "%d %d", &n, &k); | ^ main.c:23:29: error: 'moves' undeclared (first use in this function) 23 | fscanf (fin, "%d", &moves[i]); | ^~~~~ main.c:26:6: error: 'i' undeclared (first use in this function) 26 | for (i=0;i<n;i++){ | ^ main.c:27:9: error: 'j' undeclared (first use in this function) 27 | for(j=0;j<n;j++){ | ^ main.c:28:9: error: 'firim' undeclared (first use in this function) 28 | firim[i][j]=(i+j)%6; | ^~~~~ main.c:29:9: error: 'vizite' undeclared (first use in this function) 29 | vizite[i][j]=0; | ^~~~~~ main.c:38:9: error: 'directie' undeclared (first use in this function); did you mean 'direct'? 38 | directie = moves[i] - 1; | ^~~~~~~~ | direct main.c:63:22: error: expected ')' before 'j' 63 | if (vizite[i]j[j]>maxvizit){ | ~ ^ | ) main.c:11:9: warning: variable 'direct' set but not used [-Wunused-but-set-variable] 11 | int direct[8][2] = {{-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}} | ^~~~~~