foo.cc: In function 'int main()':
foo.cc:21:16: warning: operation on 'Mnum' may be undefined [-Wsequence-point]
Fsum=Fsum=Mnum=Mnum=0;
~~~~^~~~~~~
foo.cc:21:6: warning: operation on 'Fsum' may be undefined [-Wsequence-point]
Fsum=Fsum=Mnum=Mnum=0;
~~~~^~~~~~~~~~~~~~~~~
foo.cc:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%s%d%f",&s1[i].num,s1[i].name,&s1[i].sex,&s1[i].score);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:38:58: warning: 'Msum' may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("%.1f\n%.1f\n%.1f\n",Msum/Mnum,Fsum/Fnum,(Msum+Fsum)/n);
~~~~~^~~~~~
foo.cc:38:47: warning: 'Fnum' may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("%.1f\n%.1f\n%.1f\n",Msum/Mnum,Fsum/Fnum,(Msum+Fsum)/n);
~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务