foo.c: In function 'main':
foo.c:6:10: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
short g=0;
^
foo.c:10:2: error: unknown type name 'student'; use 'struct' keyword to refer to the type
student stu[10000];
^~~~~~~
struct
foo.c:12: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:12: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:12: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:12: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:12: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:12: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:13: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:13: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:13: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:14: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:14: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:14: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:15:13: error: request for member 'b' in something not a structure or union
if (stu[i].b > 90 ) stu[i].g += 2000;
^
foo.c:15:29: error: request for member 'g' in something not a structure or union
if (stu[i].b > 90 ) stu[i].g += 2000;
^
foo.c:16: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:16: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:16: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:17: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:17: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:17: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:19: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:19: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:19: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:22:17: error: request for member 'g' in something not a structure or union
temp = stu[i].g;
^
foo.c:27:15: error: request for member 'g' in something not a structure or union
sum+= stu[i].g;
^
foo.c:25:12: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
long long sum=0;
^~~
foo.c:10: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:11:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务