Borderou de evaluare (job #3223042)
Utilizator | Data | 12 aprilie 2024 11:03:07 | |
---|---|---|---|
Problema | Ridicare la putere in timp logaritmic | Status | done |
Runda | Arhiva educationala | Compilator | c-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
In file included from /usr/include/stdlib.h:32,
from main.c:2:
main.c: In function 'main':
main.c:16:22: error: invalid initializer
16 | FILE *f1=NULL,f2=NULL;
| ^~~~
main.c:18:8: error: incompatible types when assigning to type 'FILE' from type 'FILE *'
18 | f2=fopen("lgput.out","w");
| ^~~~~
main.c:22:30: error: 'N' undeclared (first use in this function)
22 | long long result = power(N, P, mod);
| ^
main.c:22:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:33: error: 'P' undeclared (first use in this function)
22 | long long result = power(N, P, mod);
| ^
main.c:23:23: error: 'rez' undeclared (first use in this function)
23 | fprintf(f2,"%lld",rez);
| ^~~
main.c:23:13: error: incompatible type for argument 1 of 'fprintf'
23 | fprintf(f2,"%lld",rez);
| ^~
| |
| FILE
In file included from main.c:1:
/usr/include/stdio.h:350:38: note: expected 'FILE * restrict' but argument is of type 'FILE'
350 | extern int fprintf (FILE *__restrict __stream,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:25:12: error: incompatible type for argument 1 of 'fclose'
25 | fclose(f2);
| ^~
| |
| FILE
/usr/include/stdio.h:178:26: note: expected 'FILE *' but argument is of type 'FILE'
178 | extern int fclose (FILE *__stream);
| ~~~~~~^~~~~~~~
main.c:22:15: warning: unused variable 'result' [-Wunused-variable]
22 | long long result = power(N, P, mod);
| ^~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !