Borderou de evaluare (job #849803)

Utilizator avatar cosminnitu Cosmin Nitu cosminnitu IP ascuns
Problemă Vrăji (clasa a 5-a) Compilator c
Rundă Tema 15 Clasa a 5-a Status evaluat
Dată 27 ian. 2026 17:01:45 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:8:44: error: redeclaration of 'i' with no linkage 8 | int n, a, i,nrb, r, v, maxnrob=0, cnt, i, ok; | ^ main.c:8:15: note: previous declaration of 'i' with type 'int' 8 | int n, a, i,nrb, r, v, maxnrob=0, cnt, i, ok; | ^ main.c:9:13: error: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 9 | fprintf("Introducem trei numar natural: "); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | char * In file included from /usr/include/stdio.h:970, from main.c:1: /usr/include/bits/stdio2.h:109:27: note: expected 'FILE *' but argument is of type 'char *' 109 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:9:5: error: too few arguments to function 'fprintf'; expected at least 2, have 1 9 | fprintf("Introducem trei numar natural: "); | ^~~~~~~ /usr/include/bits/stdio2.h:109:1: note: declared here 109 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ^~~~~~~ main.c:10:12: error: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 10 | fscanf("%d%d%d", &n, &r, &v); | ^~~~~~~~ | | | char * /usr/include/stdio.h:422:37: note: expected 'FILE *' but argument is of type 'char *' 422 | extern int fscanf (FILE *__restrict __stream, | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:10:22: error: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 10 | fscanf("%d%d%d", &n, &r, &v); | ^~ | | | int * /usr/include/stdio.h:423:43: note: expected 'const char *' but argument is of type 'int *' 423 | const char *__restrict __format, ...) __wur __nonnull ((1)); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:14:16: error: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 14 | fscanf("%d", &a); | ^~~~ | | | char * /usr/include/stdio.h:422:37: note: expected 'FILE *' but argument is of type 'char *' 422 | extern int fscanf (FILE *__restrict __stream, | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:14:22: error: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 14 | fscanf("%d", &a); | ^~