/ Vijos /

记录详情

Compile Error

foo.c:7:7: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
  int a=0,b=0,c=0;
       ^
foo.c: In function 'main':
foo.c:19:27: error: 'struct cj' has no member named 'a'
   scanf("%d %d %d",&phb[i].a,&phb[i].b,&phb[i].c);
                           ^
foo.c:19:37: error: 'struct cj' has no member named 'b'
   scanf("%d %d %d",&phb[i].a,&phb[i].b,&phb[i].c);
                                     ^
foo.c:19:47: error: 'struct cj' has no member named 'c'
   scanf("%d %d %d",&phb[i].a,&phb[i].b,&phb[i].c);
                                               ^
foo.c:21:9: error: 'struct cj' has no member named 'sum'
   phb[i].sum = phb[i].a + phb[i].b + phb[i].c;
         ^
foo.c:21:22: error: 'struct cj' has no member named 'a'
   phb[i].sum = phb[i].a + phb[i].b + phb[i].c;
                      ^
foo.c:21:33: error: 'struct cj' has no member named 'b'
   phb[i].sum = phb[i].a + phb[i].b + phb[i].c;
                                 ^
foo.c:21:44: error: 'struct cj' has no member named 'c'
   phb[i].sum = phb[i].a + phb[i].b + phb[i].c;
                                            ^
foo.c:27:13: error: 'struct cj' has no member named 'sum'
    if(phb[j].sum<phb[j+1].sum)
             ^
foo.c:27:26: error: 'struct cj' has no member named 'sum'
    if(phb[j].sum<phb[j+1].sum)
                          ^
foo.c:33:18: error: 'struct cj' has no member named 'sum'
    else if(phb[j].sum==phb[j+1].sum)
                  ^
foo.c:33:32: error: 'struct cj' has no member named 'sum'
    else if(phb[j].sum==phb[j+1].sum)
                                ^
foo.c:35:14: error: 'struct cj' has no member named 'a'
     if(phb[j].a<phb[j+1].a)
              ^
foo.c:35:25: error: 'struct cj' has no member named 'a'
     if(phb[j].a<phb[j+1].a)
                         ^
foo.c:46:38: error: 'struct cj' has no member named 'sum'
   printf("%d %d\n",phb[i].name,phb[i].sum);
                                      ^
foo.c:16:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1398 奖学金
语言
C
递交时间
2021-08-08 16:31:03
评测时间
2021-08-08 16:31:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes