foo.c: In function 'prime':
foo.c:6:20: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
6 | for(m=2;m<=sqrt(n);m++)
| ^~~~
foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
foo.c:6:20: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
6 | for(m=2;m<=sqrt(n);m++)
| ^~~~
foo.c:6:20: note: include '<math.h>' or provide a declaration of 'sqrt'
/nix/store/dpxy5cr7cm0nch0qvq2qygs9jwnmhiy5-binutils-2.38/bin/ld: /nix/store/7fz6dhhriwv6n4kdg05qi8cwf7mfqza9-glibc-2.35-163/lib/crt1.o: in function `_start':
/build/glibc-2.35/csu/../sysdeps/x86_64/start.S:103: undefined reference to `main'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务