foo.cc: In function 'int main()':
foo.cc:9:15: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=]
9 | printf("%.2lf",n*0.8);
| ~~~~^ ~~~~~
| | |
| | long double
| double
| %.2Lf
foo.cc:11:15: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=]
11 | printf("%.2lf",n*0.85);
| ~~~~^ ~~~~~~
| | |
| | long double
| double
| %.2Lf
foo.cc:13:15: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=]
13 | printf("%.2lf",n*0.9);
| ~~~~^ ~~~~~
| | |
| | long double
| double
| %.2Lf
foo.cc:15:15: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=]
15 | printf("%.2lf",n*0.95);
| ~~~~^ ~~~~~~
| | |
| | long double
| double
| %.2Lf
foo.cc:17:15: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=]
17 | printf("%.2lf",n);
| ~~~~^ ~
| | |
| | long double
| double
| %.2Lf
[Hydro](https://hydro.ac)提供评测服务