Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Input the scores of three students in four courses, call the score function to calculate the highest personal total score, and finally output the highest personal total score in the main function.
Input the scores of three students in four courses, call the score function to calculate the highest personal total score, and finally output the highest personal total score in the main function.
# contains "stdio.h"

int main()

{

int i,j;

int s[3][4];

int max

int score(int s[3][4]);

for(I = 0; I<3; i++)

{

Printf ("the score of the %d student: \n", I+1);

for(j = 0; j & lt4; j++)

scanf("%d ",& amps[I][j]);

}

Max = score;

Printf ("Maximum individual total score: %d\n", max);

Returns 0;

}

int score( int s[3][4])

{

int i,j,k;

int max = 0;

for(I = 0; I<3; i++)

{

k = 0;

for(j = 0; j & lt4; j++)

k+= s[I][j];

if(max & lt; k)

max = k;

}

Return to max

}