Borderou de evaluare (job #628763)

Utilizator avatar DP123 David Peligrad DP123 IP ascuns
Problemă Maxnrk (clasa a 5-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 29 ian. 2022 17:05:32 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:6:18: warning: unused variable 'shade' [-Wunused-variable] 6 | FILE *fin , *shade; | ^~~~~ main.c: At top level: main.c:47:5: warning: data definition has no type or storage class 47 | shade=fopen("maxnrk.out", "w"); | ^~~~~ main.c:47:5: warning: type defaults to 'int' in declaration of 'shade' [-Wimplicit-int] main.c:47:11: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion] 47 | shade=fopen("maxnrk.out", "w"); | ^~~~~ main.c:47:11: error: initializer element is not constant main.c:48:5: error: expected identifier or '(' before 'if' 48 | if(max<k){ | ^~ main.c:50:6: error: expected identifier or '(' before 'else' 50 | }else{ | ^~~~ main.c:53:19: error: expected ')' before string constant 53 | fprintf(shade, "%d", max); | ^~~~~ | ) main.c:54:5: warning: data definition has no type or storage class 54 | fclose(shade); | ^~~~~~ main.c:54:5: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:54:5: warning: parameter names (without types) in function declaration main.c:55:5: error: expected identifier or '(' before 'return' 55 | return 0; | ^~~~~~ main.c:56:1: error: expected identifier or '(' before '}' token 56 | } | ^ main.c: In function 'main': main.c:9:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result] 9 | fscanf(fin, "%d%d", &n , &k); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~