Submission #36794
ソースコード
ステータス
コンパイルメッセージ
./Main.c: In function ‘main’:
./Main.c:11:3: error: unknown type name ‘Stu’; use ‘struct’ keyword to refer to the type
Stu stu[n];
^~~
struct
./Main.c:13:31: error: request for member ‘name’ in something not a structure or union
scanf("%s %d %d %d",stu[i].name,&stu[i].ja,&stu[i].ma,&stu[i].en);
^
./Main.c:13:44: error: request for member ‘ja’ in something not a structure or union
scanf("%s %d %d %d",stu[i].name,&stu[i].ja,&stu[i].ma,&stu[i].en);
^
./Main.c:13:55: error: request for member ‘ma’ in something not a structure or union
scanf("%s %d %d %d",stu[i].name,&stu[i].ja,&stu[i].ma,&stu[i].en);
^
./Main.c:13:66: error: request for member ‘en’ in something not a structure or union
scanf("%s %d %d %d",stu[i].name,&stu[i].ja,&stu[i].ma,&stu[i].en);
^
./Main.c:14:11: error: request for member ‘sum’ in something not a structure or union
stu[i].sum=stu[i].ja+stu[i].ma+stu[i].en;
^
./Main.c:14:22: error: request for member ‘ja’ in something not a structure or union
stu[i].sum=stu[i].ja+stu[i].ma+stu[i].en;
^
./Main.c:14:32: error: request for member ‘ma’ in something not a structure or union
stu[i].sum=stu[i].ja+stu[i].ma+stu[i].en;
^
./Main.c:14:42: error: request for member ‘en’ in something not a structure or union
stu[i].sum=stu[i].ja+stu[i].ma+stu[i].en;
^
./Main.c:18:16: error: request for member ‘sum’ in something not a structure or union
if(stu[j].sum<stu[j+1].sum){
^
./Main.c:18:29: error: request for member ‘sum’ in something not a structure or union
if(stu[j].sum<stu[j+1].sum){
^
./Main.c:19:9: error: unknown type name ‘Stu’; use ‘struct’ keyword to refer to the type
Stu temp=stu[j];
^~~
struct
./Main.c:26:37: error: request for member ‘name’ in something not a structure or union
printf("%s %d %d %d %d\n",stu[i].name,stu[i].ja,stu[i].ma,stu[i].en,stu[i].sum);
^
./Main.c:26:49: error: request for member ‘ja’ in something not a structure or union
printf("%s %d %d %d %d\n",stu[i].name,stu[i].ja,stu[i].ma,stu[i].en,stu[i].sum);
^
./Main.c:26:59: error: request for member ‘ma’ in something not a structure or union
printf("%s %d %d %d %d\n",stu[i].name,stu[i].ja,stu[i].ma,stu[i].en,stu[i].sum);
^
./Main.c:26:69: error: request for member ‘en’ in something not a structure or union
printf("%s %d %d %d %d\n",stu[i].name,stu[i].ja,stu[i].ma,stu[i].en,stu[i].sum);
^
./Main.c:26:79: error: request for member ‘sum’ in something not a structure or union
printf("%s %d %d %d %d\n",stu[i].name,stu[i].ja,stu[i].ma,stu[i].en,stu[i].sum);
^
セット
テストケース