foo.cc: In function 'int main()':
foo.cc:39:13: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
39 | printf("%.1f",s1/c1);
| ~~~^ ~~~~~
| | |
| | int
| double
| %.1d
foo.cc:41:13: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
41 | printf("%.1f",s1/c0);
| ~~~^ ~~~~~
| | |
| | int
| double
| %.1d
foo.cc:43:14: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
43 | printf("%.1f",sz/n);
| ~~~^ ~~~~
| | |
| | int
| double
| %.1d
foo.cc:21:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
21 | { scanf("%d %s %d %f",&s[i].num,s[i].name,&s[i].sex,&s[i].score);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务