Borderou de evaluare (job #811619)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Cuart (clasa a 5-a) | Compilator | c-32 |
Rundă | Concurs 04 | IQ Academy | clasa a 5-a | Status | evaluat |
Dată | 25 feb. 2025 19:06:04 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:8:3: error: conflicting types for 'fin'; have 'int'
8 | fin=fopen("cuart.in","r");
| ^~~
main.c:6:9: note: previous declaration of 'fin' with type 'FILE *'
6 | FILE *fin,*fout;
| ^~~
main.c:10:22: error: 'p' undeclared (first use in this function)
10 | fscanf(fin,"%d%d",&p,&n);
| ^
main.c:10:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: 'n' undeclared (first use in this function)
10 | fscanf(fin,"%d%d",&p,&n);
| ^
main.c:11:7: error: 'i' undeclared (first use in this function)
11 | for(i=1;i<=n;i++){
| ^
main.c:12:22: error: 'c' undeclared (first use in this function)
12 | fscanf(fin,"%d",&c);
| ^
main.c:13:11: error: 'x' undeclared (first use in this function)
13 | while(x>0){
| ^
main.c:14:13: error: lvalue required as increment operand
14 | if(x%2++1){
| ^~
main.c:14:15: error: expected ')' before numeric constant
14 | if(x%2++1){
| ~ ^
| )
main.c:15:9: error: 'y' undeclared (first use in this function)
15 | y=y+x%10*p;
| ^
main.c:18:13: error: expected ';' before '}' token
18 | x=x/10
| ^
| ;
19 | }
| ~
main.c:8:3: warning: unused variable 'fin' [-Wunused-variable]
8 | fin=fopen("cuart.in","r");
| ^~~