foo.cc: In function 'int main()':
foo.cc:7:17: warning: format '%f' expects argument of type 'float*', but argument 2 has type 'double*' [-Wformat=]
7 | scanf("%f,%f,%s",&a,&b,&op);
| ~^ ~~
| | |
| float* double*
| %lf
foo.cc:7:20: warning: format '%f' expects argument of type 'float*', but argument 3 has type 'double*' [-Wformat=]
7 | scanf("%f,%f,%s",&a,&b,&op);
| ~^ ~~
| | |
| float* double*
| %lf
foo.cc:14:15: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
14 | printf("%.2f",ans);
| ~~~~~~^~~~~~~~~~~~
foo.cc:5:16: note: 'ans' was declared here
5 | double a,b,ans;
| ^~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务