Compile Error

foo.cc: In function 'int main()':
foo.cc:22:2: error: expected ';' before 'for'
  for(i=0;i<n;i++)
  ^~~
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:22:11: warning: statement has no effect [-Wunused-value]
  for(i=0;i<n;i++)
          ~^~
foo.cc:22:17: error: expected ';' before ')' token
  for(i=0;i<n;i++)
                 ^
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);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1150 结构体-学生信息处理2
语言
C++
递交时间
2021-11-20 17:22:13
评测时间
2021-11-20 17:22:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes