CodePudding user response:
Save the childrenCodePudding user response:
Typedef struct
{
Int scoreA, scoreB scoreC;
Int aver.
Char * name;
} student (NUM)
Input/output:
Void IO ()
{
for(i=0; IThe scanf (" % s ", & amp; Student [I] name);
The scanf (" % d, % d, % d ", & amp; Student [I]. ScoreA, & amp; Student [I]. ScoreB, & amp; Student [I] scoreC);
}
Sorting:
Void the sort () {
Int I, j, TMP.
for(i=1; ITMP=student [I] aver;
For (j=I; J> 0 & amp; & Student [j - 1] averStudent [j]. Journal of aver=student [j - 1] aver.
Student [j]. Journal of aver=TMP;
}
}
To find the lowest points in the for loop using if compared, selected maximum or minimum line
In language use a for loop to everyone's language result with the if or switch classification