Borderou de evaluare (job #783481)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Prime (clasa a 5-a) | Compilator | c-32 |
| Rundă | Arhiva de probleme | Status | evaluat |
| Dată | 7 aug. 2024 16:26:58 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:9:9: error: incompatible types when assigning to type 'FILE' from type 'FILE *'
9 | fin=fopen ("prime.in", "r");
| ^~~~~
main.c:10:13: error: incompatible type for argument 1 of 'fscanf'
10 | fscanf (fin, "%d%d", &x, &n);
| ^~~
| |
| FILE
In file included from main.c:1:
/usr/include/stdio.h:422:37: note: expected 'FILE * restrict' but argument is of type 'FILE'
422 | extern int fscanf (FILE *__restrict __stream,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:11:13: error: incompatible type for argument 1 of 'fclose'
11 | fclose (fin);
| ^~~
| |
| FILE
/usr/include/stdio.h:184:26: note: expected 'FILE *' but argument is of type 'FILE'
184 | extern int fclose (FILE *__stream) __nonnull ((1));
| ~~~~~~^~~~~~~~
main.c:17:14: error: 'd' undeclared (first use in this function)
17 | i=2; d=0;
| ^
main.c:17:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:10: error: incompatible types when assigning to type 'FILE' from type 'FILE *'
25 | fout=fopen ("prime.out", "w");
| ^~~~~
main.c:26:14: error: incompatible type for argument 1 of 'fprintf'
26 | fprintf (fout, "%d", cx);
| ^~~~
| |
| FILE
In file included from /usr/include/stdio.h:980:
/usr/include/bits/stdio2.h:77:27: note: expected 'FILE * restrict' but argument is of type 'FILE'
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:46:14: error: incompatible type for argument 1 of 'fprintf'
46 | fprintf (fout, "%d", s);
| ^~~~
| |
| FILE
/usr/include/bits/stdio2.h:77:27: note: expected 'FILE * restrict' but argument is of type 'FILE'
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:47:13: error: incompatible type for argument 1 of 'fclose'
47 | fclose (fout);
| ^~~~
| |
| FILE