Borderou de evaluare (job #790857)

Utilizator avatar NeaguIoan Negu Catalin NeaguIoan IP ascuns
Problemă Medalion (clasa a 6-a) Compilator c-32
Rundă Tema 12 Clasa a 6-a Status evaluat
Dată 22 oct. 2024 19:55:04 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:4:16: warning: unused variable 'out' [-Wunused-variable] 4 | FILE *in, *out; | ^~~ main.c: At top level: main.c:36:5: error: expected identifier or '(' before 'for' 36 | for( i = 1; i <= n; i++ ){ | ^~~ main.c:36:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 36 | for( i = 1; i <= n; i++ ){ | ^~ main.c:36:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 36 | for( i = 1; i <= n; i++ ){ | ^~ main.c:43:9: warning: data definition has no type or storage class 43 | out = fopen( "medalion.out", "w" ); | ^~~ main.c:43:9: warning: type defaults to 'int' in declaration of 'out' [-Wimplicit-int] main.c:43:15: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion] 43 | out = fopen( "medalion.out", "w" ); | ^~~~~ main.c:43:15: error: initializer element is not constant main.c:44:22: error: expected ')' before string constant 44 | fprintf( out, "%lld\n", maxi ); | ^~~~~~~~~ | ) main.c:45:9: warning: data definition has no type or storage class 45 | val = ( 1 + 4 * p * p + 3 * p ) % k; | ^~~ main.c:45:9: warning: type defaults to 'int' in declaration of 'val' [-Wimplicit-int] main.c:45:25: error: 'p' undeclared here (not in a function) 45 | val = ( 1 + 4 * p * p + 3 * p ) % k; | ^ main.c:45:43: error: 'k' undeclared here (not in a function) 45 | val = ( 1 + 4 * p * p + 3 * p ) % k; | ^ main.c:46:9: error: expected identifier or '(' before 'if' 46 | if ( val == 0 ) | ^~ main.c:48:5: error: expected identifier or '(' before 'else' 48 | else | ^~~~ main.c:50:9: warning: data definition has no type or storage class 50 | fclose(out); | ^~~~~~ main.c:50:9: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:50:9: warning: parameter names (without types) in function declaration main.c:51:9: error: expected identifier or '(' before 'return' 51 | return 0; | ^~~~~~