foo.c: In function 'main':
foo.c:20:20: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
20 | if(abs(total)>p/abs((k-1)))
| ^~~
foo.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
2 | #include<math.h>
+++ |+#include <stdlib.h>
3 |
foo.c:20:24: warning: 'abs' argument 1 type is 'long long int' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
20 | if(abs(total)>p/abs((k-1)))
| ^~~~~
<built-in>: note: built-in 'abs' declared here
foo.c:20:39: warning: 'abs' argument 1 type is 'long long int' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
20 | if(abs(total)>p/abs((k-1)))
| ~~^~~
<built-in>: note: built-in 'abs' declared here
foo.c:40:24: warning: 'abs' argument 1 type is 'long long int' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
40 | if(abs(total)>p/abs((k-1)))
| ^~~~~
<built-in>: note: built-in 'abs' declared here
foo.c:40:39: warning: 'abs' argument 1 type is 'long long int' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
40 | if(abs(total)>p/abs((k-1)))
| ~~^~~
<built-in>: note: built-in 'abs' declared here
[Hydro](https://hydro.ac)提供评测服务