Borderou de evaluare (job #817511)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Geometrie (clasa a 8-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 1 apr. 2025 21:53:49 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:26:17: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
26 | d = sqrt(abs(y - l[i]) * abs(y - l[i]) + abs(x - c[i]) * abs(x - c[i]));
| ^~~~
main.c:3:1: note: include '<math.h>' or provide a declaration of 'sqrt'
2 | #include <stdlib.h>
+++ |+#include <math.h>
3 |
main.c:26:17: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
26 | d = sqrt(abs(y - l[i]) * abs(y - l[i]) + abs(x - c[i]) * abs(x - c[i]));
| ^~~~
main.c:26:17: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:15:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | fscanf(fin, "%d%d", &C, &N);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:18:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | fscanf(fin, "%d%d", &l[i], &c[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:20:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
20 | fscanf(fin, "%d%d", &y, &x);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~