Borderou de evaluare (job #813055)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Alarma (clasa a 6-a) | Compilator | c-32 |
Rundă | Simulare 2 OJI clasa a 6-a 2025 | Status | evaluat |
Dată | 7 mar. 2025 09:59:12 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:40:22: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
40 | cnt+=abs(a[nr]-a[uc%10]) + abs(b[nr]-b[uc%10]);
| ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
1 | #include <stdio.h>
+++ |+#include <stdlib.h>
2 |
main.c:18:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | fscanf(fin, "%d%d", &a[i], &b[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:21:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | fscanf(fin, "%d", &x);
| ^~~~~~~~~~~~~~~~~~~~~