/ Vijos /

记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2022-09-13 18:44:02
评测时间
2022-09-13 18:44:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes