Borderou de evaluare (job #808673)

Utilizator avatar ArghirBianca Arghir Bianca-Elena ArghirBianca IP ascuns
Problemă Șir7 (clasa a 5-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 10 feb. 2025 18:17:48 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:4:11: warning: unused variable 'fin' [-Wunused-variable] 4 | FILE *fin = fopen("sir7.in", "r"); | ^~~ main.c: At top level: main.c:10:14: error: expected ']' before ';' token 10 | int sir[N;] | ^ | ] main.c:13:16: error: expected ')' before string constant 13 | fscanf(fin, "%d", &N); | ^~~~~ | ) main.c:15:5: error: expected identifier or '(' before 'for' 15 | for (int i = 0; i < N; i++) { | ^~~ main.c:15:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 15 | for (int i = 0; i < N; i++) { | ^ main.c:15:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 15 | for (int i = 0; i < N; i++) { | ^~ main.c:19:5: warning: data definition has no type or storage class 19 | fclose(fin); | ^~~~~~ main.c:19:5: error: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:19:5: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] main.c:22:5: error: expected identifier or '(' before 'if' 22 | if (C == 1) { | ^~ main.c:39:7: error: expected identifier or '(' before 'else' 39 | } else if (C == 2) { | ^~~~ main.c:54:7: error: expected identifier or '(' before 'else' 54 | } else if (C == 3) { | ^~~~ main.c:77:5: warning: data definition has no type or storage class 77 | fclose(fout); | ^~~~~~ main.c:77:5: error: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:77:5: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] main.c:79:5: error: expected identifier or '(' before 'return' 79 | return 0; | ^~~~~~ main.c:80:1: error: expected identifier or '(' before '}' token 80 | } | ^