Borderou de evaluare (job #732847)

Utilizator avatar Costache_Andrei_paul Costache Andrei Paul Costache_Andrei_paul IP ascuns
Problemă Kdiv (clasa a 5-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 21 sept. 2023 15:16:05 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:23:13: error: too few arguments to function 'fopen' 23 | fin=fopen("kdiv.in" "r"); | ^~~~~ In file included from main.c:3: /usr/include/stdio.h:258:14: note: declared here 258 | extern FILE *fopen (const char *__restrict __filename, | ^~~~~ main.c:24:14: error: too few arguments to function 'fopen' 24 | fout=fopen("kdiv.out" "w"); | ^~~~~ /usr/include/stdio.h:258:14: note: declared here 258 | extern FILE *fopen (const char *__restrict __filename, | ^~~~~ main.c:26:16: warning: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 26 | fscanf("%d%d", &n,&k); | ^~~~~~ | | | char * /usr/include/stdio.h:415:37: note: expected 'FILE * restrict' but argument is of type 'char *' 415 | extern int fscanf (FILE *__restrict __stream, | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:26:24: warning: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 26 | fscanf("%d%d", &n,&k); | ^~ | | | int * /usr/include/stdio.h:416:43: note: expected 'const char * restrict' but argument is of type 'int *' 416 | const char *__restrict __format, ...) __wur; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:30:17: error: 'cin' undeclared (first use in this function); did you mean 'fin'? 30 | cin>>nr; | ^~~ | fin main.c:30:17: note: each undeclared identifier is reported only once for each function it appears in main.c:36:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 36 | fprintf("%d" ,&cnt); | ^~~~ | | | char * In file included from /usr/include/stdio.h:906: /usr/include/bits/stdio2.h:77:27: note: expected 'FILE * restrict' but argument is of type 'char *' 77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:36:23: warning: passing argument 2 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 36 | fprintf("%d" ,&cnt); | ^~~~ | | | int * /usr/include/bits/stdio2.h:77:60: note: expected 'const char * restrict' but argument is of type 'int *'