Borderou de evaluare (job #3358125)

Utilizator Lupu_Mirabela_DianaLupu Mirabela Diana Lupu_Mirabela_Diana Data 14 iunie 2026 20:33:56
Problema Ridicare la putere in timp logaritmic Status done
Runda Arhiva educationala Compilator c-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:12:30: error: expected ';' before 'out' 12 | in=fopen("lgput.in", "r") | ^ | ; 13 | out=fopen("lgput.out", "w"); | ~~~ main.c:15:12: warning: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 15 | fscanf("%d %d", &n, &p, in); | ^~~~~~~ | | | char * In file included from main.c:1: /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:15:21: warning: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types] 15 | fscanf("%d %d", &n, &p, in); | ^~ | | | unsigned int * /usr/include/stdio.h:416:43: note: expected 'const char * restrict' but argument is of type 'unsigned int *' 416 | const char *__restrict __format, ...) __wur; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:19:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation] 19 | if ( ((1<<i) & p) > 0) | ^~ main.c:22:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 22 | a=(a * a) % m; | ^ main.c:24:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 24 | fprintf("%lld\n", sol, out); | ^~~~~~~~ | | | char * /usr/include/stdio.h:350:38: note: expected 'FILE * restrict' but argument is of type 'char *' 350 | extern int fprintf (FILE *__restrict __stream, | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:24:27: warning: passing argument 2 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] 24 | fprintf("%lld\n", sol, out); | ^~~ | | | long long int /usr/include/stdio.h:351:44: note: expected 'const char * restrict' but argument is of type 'long long int' 351 | const char *__restrict __format, ...); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?