Borderou de evaluare (job #743235)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Pinochio (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 7 nov. 2023 21:09:03 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:18:5: error: 'y' undeclared (first use in this function)
18 | y++;
| ^
main.c:18:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:16: warning: unused variable 'fout' [-Wunused-variable]
4 | FILE *fin, *fout;
| ^~~~
main.c: At top level:
main.c:21:5: warning: data definition has no type or storage class
21 | fout=fopen("pinochio.out","w");
| ^~~~
main.c:21:5: warning: type defaults to 'int' in declaration of 'fout' [-Wimplicit-int]
main.c:21:10: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion]
21 | fout=fopen("pinochio.out","w");
| ^~~~~
main.c:21:10: error: initializer element is not constant
main.c:22:18: error: expected ')' before string constant
22 | fprintf(fout,"%d",n);
| ^~~~
| )
main.c:23:5: warning: data definition has no type or storage class
23 | fclose(fout);
| ^~~~~~
main.c:23:5: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int]
main.c:23:5: warning: parameter names (without types) in function declaration
main.c:24:5: error: expected identifier or '(' before 'return'
24 | return 0;
| ^~~~~~
main.c:25:2: error: expected identifier or '(' before '}' token
25 | }
| ^
main.c: In function 'main':
main.c:8:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | fscanf(fin,"%d%d%d",&n,&p,&k);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~