/ Vijos /

记录详情

Compile Error

/in/foo.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
  int sum=0;
         ^
/in/foo.c: In function 'main':
/in/foo.c:18:30: error: 'struct student' has no member named 'name'
   scanf("%s%d%d%c%c%d",stu[i].name,&stu[i].te,&stu[i].cla,&stu[i].b,&stu[i].b,&stu[i].l);
                              ^
/in/foo.c:18:66: error: 'struct student' has no member named 'b'
   scanf("%s%d%d%c%c%d",stu[i].name,&stu[i].te,&stu[i].cla,&stu[i].b,&stu[i].b,&stu[i].l);
                                                                  ^
/in/foo.c:18:76: error: 'struct student' has no member named 'b'
   scanf("%s%d%d%c%c%d",stu[i].name,&stu[i].te,&stu[i].cla,&stu[i].b,&stu[i].b,&stu[i].l);
                                                                            ^
/in/foo.c:22:10: error: 'struct student' has no member named 'sum'
    stu[i].sum+=8000;
          ^
/in/foo.c:24:10: error: 'struct student' has no member named 'sum'
    stu[i].sum+=4000;
          ^
/in/foo.c:26:10: error: 'struct student' has no member named 'sum'
    stu[i].sum+=2000;
          ^
/in/foo.c:27:26: error: 'struct student' has no member named 'x'
   if(stu[i].te>85&&stu[i].x=='Y')
                          ^
/in/foo.c:28:10: error: 'struct student' has no member named 'sum'
    stu[i].sum+=1000;
          ^
/in/foo.c:29:27: error: 'struct student' has no member named 'b'
   if(stu[i].cla>80&&stu[i].b=='Y')
                           ^
/in/foo.c:30:10: error: 'struct student' has no member named 'sum'
    stu[i].sum+=850;
          ^
/in/foo.c:32:12: error: 'struct student' has no member named 'sum'
  max=stu[1].sum;
            ^
/in/foo.c:36:12: error: 'struct student' has no member named 'sum'
   if(stu[i].sum>max)
            ^
/in/foo.c:38:14: error: 'struct student' has no member named 'sum'
    max=stu[i].sum;
              ^
/in/foo.c:41:12: error: 'struct student' has no member named 'sum'
   s+=stu[i].sum;
            ^
/in/foo.c:43:13: error: 'struct student' has no member named 'name'
  puts(stu[p].name);
             ^
/in/foo.c:14:10: warning: unused variable 'j' [-Wunused-variable]
  int n,i,j,max,p;
          ^

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2018-02-03 15:39:41
评测时间
2018-02-03 15:39:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes