foo.c: In function 'is_prime':
foo.c:30:14: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
int sq = sqrt(n);
^~~~
foo.c:30:14: warning: incompatible implicit declaration of built-in function 'sqrt'
foo.c:30:14: note: include '<math.h>' or provide a declaration of 'sqrt'
foo.c: In function 'main':
foo.c:8:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务