foo.c:5:93: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
5 | char name[20] ;int terminal;int classgrade;char leader;char west;int paper;int money=0;
| ^
foo.c: In function 'main':
foo.c:15:63: error: 'struct student' has no member named 'money'
15 | if(stu[i].terminal>80&&stu[i].paper>=1){stu[i].money+=8000;}
| ^
foo.c:16:68: error: 'struct student' has no member named 'money'
16 | if(stu[i].terminal>85&&stu[i].classgrade>80){stu[i].money+=4000;}
| ^
foo.c:17:46: error: 'struct student' has no member named 'money'
17 | if(stu[i].terminal>90){stu[i].money+=2000;}
| ^
foo.c:18:64: error: 'struct student' has no member named 'money'
18 | if(stu[i].terminal>85&&stu[i].west=='Y'){stu[i].money+=1000;}//单引号!
| ^
foo.c:19:68: error: 'struct student' has no member named 'money'
19 | if(stu[i].classgrade>80&&stu[i].leader=='Y'){stu[i].money+=850;}
| ^
foo.c:23:30: error: 'struct student' has no member named 'money'
23 | total+=stu[i].money;
| ^
foo.c:24:35: error: 'struct student' has no member named 'money'
24 | if(maxmoney<stu[i].money)
| ^
foo.c:27:40: error: 'struct student' has no member named 'money'
27 | maxmoney=stu[j].money;
| ^
foo.c:30:49: error: 'struct student' has no member named 'money'
30 | printf("%s\n%d\n%d\n",stu[j].name,stu[j].money,total);
| ^
[Hydro](https://hydro.ac)提供评测服务