How to write a C Program Structure Example in C Programming Language ?
Solution For C Program ://C Program Structure Example.
#include "student.h" // include struct Student
int maxScore(int n, Student *students /* Array */){
int first = 0; // Suppose the individual is the first 0
int i;
for( i = 1 ; i < n ; i++ ){
if( students[i].english +
students[i].math +
students[i].chinese >
students[first].math +
students[first].english +
students[first].chinese )
{
first = i;
}
}
return students[first].id;
}