Borderou de evaluare (job #605298)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Tastatura2 (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 3 sept. 2021 13:41:52 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:15:25: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'char *' [-Wformat=]
15 | while(fscanf(fin, "%d", &ch))
| ~^ ~~~
| | |
| | char *
| int *
| %hhd
main.c:25:24: error: expected ')' before 'ch'
25 | nr=nr+(int(ch)-48);
| ^~
| )
main.c:25:27: error: expected ')' before '-' token
25 | nr=nr+(int(ch)-48);
| ~ ^
| )
main.c:26:20: error: expected ')' before 'ch'
26 | p=(int(ch)-48);
| ^~
| )
main.c:26:23: error: expected ')' before '-' token
26 | p=(int(ch)-48);
| ~ ^
| )
main.c:14:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | fscanf(fin, "%d", &k);
| ^~~~~~~~~~~~~~~~~~~~~