write a algorithm to print average marks of student of 3 subject
Answers
Answer:
Students with maximum average score of three subjects
Given a file containing data of student name and marks scored by him/her in 3 subjects. The task is to find the list of students having the maximum average score.
Note : If more than one student has the maximum average score, print them as per the order in the file.
Examples:
Input : file[] = {“Shrikanth”, “20”, “30”, “10”, “Ram”, “100”, “50”, “10”}
Output : Ram 53
Average scores of Shrikanth, Ram are 20 and 53 respectively. So Ram has the maximum average score of 53.
Input : file[] = {“Ramesh”, “90”, “70”, “40”, “Adam”, “50”, “10”,
”40″, “Suresh”, “22”, “1”, “56”, “Rocky”, “100”, “90”, “10”}
Output : Ramesh Rocky 66
Average scores of Ramesh, Adam, Suresh and Rocky are 66, 33, 26 and 66 respectively. So both Ramesh and Rocky have the maximum average score of 66.
ok read my profile