Borderou de evaluare (job #796133)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Concurs (clasa a 5-a) | Compilator | c-32 |
Rundă | Concurs 01 | IQ Academy | clasa a 5-a | Status | evaluat |
Dată | 19 nov. 2024 19:15:48 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:8:11: error: called object 'fin' is not a function or function pointer
8 | fopen=fin("concurs.in","r");
| ^~~
main.c:7:11: note: declared here
7 | FILE *fin,*fout;
| ^~~
main.c:9:11: error: called object 'fout' is not a function or function pointer
9 | fopen=fout("concurs.out","w");
| ^~~~
main.c:7:16: note: declared here
7 | FILE *fin,*fout;
| ^~~~
main.c:10:16: warning: too many arguments for format [-Wformat-extra-args]
10 | fscanf(fin,"%d",&h,&n);
| ^~~~
main.c:13:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
13 | for(i=1;i<n;i++); {
| ^~~
main.c:13:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
13 | for(i=1;i<n;i++); {
| ^
main.c:14:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
14 | if (i=h) {
| ^
main.c:16:13: error: expected '}' before 'else'
16 | else {
| ^~~~
main.c:20:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
20 | if(a=i/100) {
| ^
main.c:23:23: error: lvalue required as left operand of assignment
23 | if(a=i/100 && b=i/10%10) {
| ^
main.c:24:9: error: 'cntr2' undeclared (first use in this function); did you mean 'cnt2'?
24 | cntr2=cntr2+1;
| ^~~~~
| cnt2
main.c:24:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:24: warning: unused variable 'cnt2' [-Wunused-variable]
6 | int i,n,a,b,h,cntr,cnt2;
| ^~~~
main.c: At top level:
main.c:27:18: error: expected ')' before string constant
27 | fprintf(fout,"%d",cntr);
| ^~~~
| )
main.c:28:18: error: expected ')' before string constant
28 | fprintf(fout,"%d",cnt2);
| ^~~~