Class Average Problem (Id-2744)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018]

Program ID- 2744

The marks scored by the students in a test  are stored in a file. The file has the information of the students such as , number, marks scored, and the time taken by the student to complete the test
Student Number          Marks scored         Time taken (in mts)
01          25           40
02           52            38
03           45            60
04            64           52
05           50            50
Write a  C++ program that reads the data in the file created and displays the student’s number, marks scored, time taken by the student to complete the test along with the total marks scored by all the students,   Total time taken by all the students, average marks scored by the students per minute

Input Format:
Name of the file
Input file contains

Student’s number, marks scored, time taken by the student to complete the test, separated by a tab,  of student-1

Student’s number, marks scored, time taken by the student to complete the test, separated by a tab,  of student-2

….
Student’s number, marks scored, time taken by the student to complete the test, separated by a tab,  of student-n

Output Format:
Student’s number, marks scored,Time taken by the student-1, Average mark scored by the student per minute of the test-time, separated by tab.

Student’s number,marks scored,Time taken by the student-2 , Average mark scored by the student per minute of the test-time ,  separated by tab

Student’s number, marks scored,Time taken by the student-n, Average mark scored by the student per minute of the test-time  separated by tab

Total marks scored by all the students
Total time (in minutes) taken by all the students
Sum of the average marks of all the students scored per minute of the test.

Average mark scored (by all the students) per minute of the test-time

Code

Please Comment Working if the code worked to you

If you have other working codes please comment the codes enclosing with <pre> and </pre> 🙂

Example: <pre> Your Code </pre>

C++ Code 

The Above Codes are for reference only. It doesn't mean everyone to directly copy/paste those codes.

 

Click Here to Leave a Comment Below 0 comments

Leave a Reply: