foo.c: In function 'main':
foo.c:6:10: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
short g=0;
^
foo.c:11:2: error: unknown type name 'student'; use 'struct' keyword to refer to the type
student stu[10000];
^~~~~~~
struct
foo.c:13:52: error: request for member 'a' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:13:63: error: request for member 'b' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:13:74: error: request for member 'c' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:13:85: error: request for member 'd' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:13:96: error: request for member 'e' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:13:107: error: request for member 'f' in something not a structure or union
for (int i = 0; scanf("%s %d %d %d %d %d", &stu[i].a, &stu[i].b, &stu[i].c, &stu[i].d, &stu[i].e, &stu[i].f) != EOF;) {
^
foo.c:14:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 80 && stu[i].f >= 1) stu[i].g += 8000;
^
foo.c:14:30: error: request for member 'f' in something not a structure or union
if (stu[i].b > 80 && stu[i].f >= 1) stu[i].g += 8000;
^
foo.c:14:45: error: request for member 'g' in something not a structure or union
if (stu[i].b > 80 && stu[i].f >= 1) stu[i].g += 8000;
^
foo.c:15:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 85 && stu[i].c >= 80) stu[i].g += 4000;
^
foo.c:15:30: error: request for member 'c' in something not a structure or union
if (stu[i].b > 85 && stu[i].c >= 80) stu[i].g += 4000;
^
foo.c:15:46: error: request for member 'g' in something not a structure or union
if (stu[i].b > 85 && stu[i].c >= 80) stu[i].g += 4000;
^
foo.c:16:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 90 ) stu[i].g += 2000;
^
foo.c:16:29: error: request for member 'g' in something not a structure or union
if (stu[i].b > 90 ) stu[i].g += 2000;
^
foo.c:17:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 85 && stu[i].e == 'Y') stu[i].g += 1000;
^
foo.c:17:30: error: request for member 'e' in something not a structure or union
if (stu[i].b > 85 && stu[i].e == 'Y') stu[i].g += 1000;
^
foo.c:17:47: error: request for member 'g' in something not a structure or union
if (stu[i].b > 85 && stu[i].e == 'Y') stu[i].g += 1000;
^
foo.c:18:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 80 && stu[i].d == 'Y') stu[i].g += 850;
^
foo.c:18:30: error: request for member 'd' in something not a structure or union
if (stu[i].b > 80 && stu[i].d == 'Y') stu[i].g += 850;
^
foo.c:18:47: error: request for member 'g' in something not a structure or union
if (stu[i].b > 80 && stu[i].d == 'Y') stu[i].g += 850;
^
foo.c:20:14: error: request for member 'g' in something not a structure or union
if (stu[i].g > stu[i - 1].g)temp = stu[i].g;
^
foo.c:20:29: error: request for member 'g' in something not a structure or union
if (stu[i].g > stu[i - 1].g)temp = stu[i].g;
^
foo.c:20:45: error: request for member 'g' in something not a structure or union
if (stu[i].g > stu[i - 1].g)temp = stu[i].g;
^
foo.c:24:17: error: request for member 'g' in something not a structure or union
temp = stu[i].g;
^
foo.c:30:15: error: request for member 'g' in something not a structure or union
sum+= stu[i].g;
^
foo.c:32:26: warning: array subscript has type 'char' [-Wchar-subscripts]
printf("%s\n%d\n%d", stu[ll].a, stu[ll].g, sum);
^
foo.c:32:30: error: request for member 'a' in something not a structure or union
printf("%s\n%d\n%d", stu[ll].a, stu[ll].g, sum);
^
foo.c:32:37: warning: array subscript has type 'char' [-Wchar-subscripts]
printf("%s\n%d\n%d", stu[ll].a, stu[ll].g, sum);
^
foo.c:32:41: error: request for member 'g' in something not a structure or union
printf("%s\n%d\n%d", stu[ll].a, stu[ll].g, sum);
^
foo.c:11:10: warning: variable 'stu' set but not used [-Wunused-but-set-variable]
student stu[10000];
^~~
foo.c:9:8: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
short temp;
^~~~
foo.c:12:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务