# include & ltstring.h & gt
# include & ltstdlib.h & gt
# Define N 3
Structural score
{
Floating-point mathematics;
Floating English;
Floating-point computer;
};
Structural students
{
Int number;
char name[20];
Structural score sco
Floating average;
};
Stu [n], a structural student;
float input _ score(int); //Calculate the average grade of students.
void print _ student 2(void); //Display the title
void print _ student 3(int); //Display student information
void print _ student 1(int); //Display all student information.
Voidprint _ student1(int a)//displays all student data.
{
Printf ("Details of all students in this class are as follows \ n");
print _ student 2();
for(int I = 0; I & lta;; i++)
{
Print_student3 (1);
}
}
Void print_student3(int a)// displays student information.
{
printf(" % 8d % 12s % 14.2 f % 14.2 f % 14.2 f % 14.2 f \ n ",stu[a]。 Number, Stu [a]. Name, Stu [a]. Math, Stu [a]. English, Stu [a]. Computer, Stu [a]. Average);
}
Void print_student2(void)// Display header
{
printf("? Student number? Name? Math scores? English scores, average computer scores \ n ");
}
Voidinput _ student1(int a)//Enter student information.
{
Printf ("student number:");
Scanf("%d ",& stu [a]. No.);
getchar();
printf(" name:");
Get (stu[a]). Name);
Printf ("Math scores:");
scanf("%f ",& ampstu[a]. SCO . math);
Printf ("English score:");
scanf("%f ",& ampstu[a]. SCO . English);
Printf ("computer score:");
scanf("%f ",& ampstu[a]. SCO . computer);
}
Float input_score(int a)// Calculate the average grade of students.
{
return(stu[a]. SCO . math+stu[a]. SCO . English+stu[a]. SCO . computer)/3;
}
int main()
{
input _ student 1( 1);
input _ score( 1);
print _ student 2();
print _ student 3( 1);
print _ student 1( 1);
print _ student 1( 1);
}