You are viewing a single comment's thread. Return to all comments →
int marks_summation(int* marks, int number_of_students, char gender) { int sum=0; char g,b; for(int i=0;i<number_of_students;i++){ if(i%2!=0 && gender=='g'){ sum+=marks[i]; } else if(i%2==0 && gender=='b'){ sum+=marks[i]; } } return sum; }
Seems like cookies are disabled on this browser, please enable them to open this website
Students Marks Sum
You are viewing a single comment's thread. Return to all comments →