CodePudding user response:
For your reference
# include & lt; Stdio. H>
# include & lt; stdlib.h>
# include & lt; String. H>
Typedef struct Student
{
Char name [20].
int age;
Int math;
Int English;
Int Chinese;
Float avge;
} Stu.
Int main ()
{
Stu s [3].
int i;
for (i=0; i<3; I++)
{
Printf (" enter the names of the students into the first % d age English language result in math: \ n ", I + 1);
The scanf (" % s % d % d % d % d ", [I] s name, & amp; S [I]. Age, & amp; S [I]. Math, & amp; S [I]. English, & amp; S [I]. Chinese);
S [I] avge=(s [I]. Math + s [I] English + s [I]. Chinese) * 1.0/3;
Getchar ();
}
for (i=0; i<3; I++)
{
Printf (" % s average students are divided into: % 2 f \ n ", [I] s name, s [I] avge);
}
Getchar ();
return 0;
}