/in/foo.c: In function 'qiujie':
/in/foo.c:8:28: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
8 | printf("%.2f\n",x);
| ~~~^ ~
| | |
| | int
| double
| %.2d
/in/foo.c:14:36: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
14 | printf("%.2f\n",x);
| ~~~^ ~
| | |
| | int
| double
| %.2d
/in/foo.c:19:36: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
19 | printf("%.2f\n%.2f\n",x1,x2);
| ~~~^ ~~
| | |
| double int
| %.2d
/in/foo.c:19:42: warning: format '%f' expects argument of type 'double', but argument 3 has type 'int' [-Wformat=]
19 | printf("%.2f\n%.2f\n",x1,x2);
| ~~~^ ~~
| | |
| double int
| %.2d
/in/foo.c:22:25: error: 'realpart' undeclared (first use in this function)
22 | realpart=-b/(2*a);
| ^~~~~~~~
/in/foo.c:22:25: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:23:25: error: 'imagpart' undeclared (first use in this function)
23 | imagpart=sqrt(-delta)/(2*a);
| ^~~~~~~~