Borderou de evaluare (job #692839)

Utilizator avatar mihaiBoanta Mihai Boanta mihaiBoanta IP ascuns
Problemă Expr (clasele 7-8) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 4 feb. 2023 13:30:32 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'expr': main.c:9:18: warning: implicit declaration of function 'term' [-Wimplicit-function-declaration] 9 | long x = term(); | ^~~~ main.c: At top level: main.c:20:7: error: conflicting types for 'term'; have 'long int()' 20 | long term() | ^~~~ main.c:9:18: note: previous implicit declaration of 'term' with type 'int()' 9 | long x = term(); | ^~~~ main.c: In function 'term': main.c:22:18: warning: implicit declaration of function 'fact' [-Wimplicit-function-declaration] 22 | long x = fact(); | ^~~~ main.c:23:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] 23 | printf("%d ", x); | ~^ ~ | | | | int long int | %ld main.c: At top level: main.c:36:7: error: conflicting types for 'fact'; have 'long int()' 36 | long fact() | ^~~~ main.c:22:18: note: previous implicit declaration of 'fact' with type 'int()' 22 | long x = fact(); | ^~~~ main.c: In function 'fact': main.c:40:24: warning: implicit declaration of function 'INT' [-Wimplicit-function-declaration] 40 | return INT(); | ^~~ main.c: At top level: main.c:48:7: error: conflicting types for 'INT'; have 'long int()' 48 | long INT() | ^~~ main.c:40:24: note: previous implicit declaration of 'INT' with type 'int()' 40 | return INT(); | ^~~ main.c: In function 'main': main.c:63:24: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=] 63 | fprintf(fout,"%d ",expr()); | ~^ ~~~~~~ | | | | int long int | %ld main.c: In function 'fact': main.c:47:1: warning: control reaches end of non-void function [-Wreturn-type] 47 | } | ^