Write a program that reads a text file Solved

35.00 $

Category:

Description

Rate

You can work on this lab with a partner, but there is an extra requirement if you decide to go that route.The following requirements apply to everyone:Write a program that reads a text file.
The user will input the file name containing a list of students with their test scores on three tests. For example:
Ana 75 82 91
John 80 93 100
Mary 91 77 92

The program calculates and prints out for each student: their name, the lowest, the highest and the average score. Round the average to the nearest tenth. Create a well-formatted table to display the data on the screen.

Print the header only once.+——————————————————| Name Average Lowest Highest+——————————————————[ the output data goes here ]

At the end, the program should print the class average.Implement the following functions:
// This function calculates and returns the average of the three scores passed as parameters.double calcAverage (int first, int second, int third);
// This function determines and returns the highest of the three scores passed as parameters.int findHighest (int first, int second, int third);
// This function determines and returns the lowest of the three scores passed as parameters.int findLowest (int first, int second, int third);

Download Lab5.txt to test your program.Include a header comment at the beginning of your code with a brief description of your program, course, lab number, author and date.

Additionally, add comments to your source code describing variables and calculations.Include function prototypes.Make sure the program compiles and runs correctly.Rename your source file using the following convention:lastname_firstname_lab5.cppIf you are working with a partner:Also print the data that you print on the screen to an output file.