Write a program that reads data from a file (use the attached data file). These data are a student name and 3 test scores. The program should calculate the average of the 3 test scores, and display the name, 3 test scores, and the average to the monitor.

Useful tips:
a) Include the following header files: iostream, fstream, iomanip, and string
b) The name of the data file is “datafile.txt”, you need to save the file in the same folder of the source file.
c) use the manipulators (setw, setprecision, setfill, showpoint, fixed) to format the average with 1 digits after decimal point as following.
d) Use character ‘\t’ for tab.

Good Luck
* student name amb *
* *
* three test 89 76 92 *
* *
* average 85.7 *

this is how the output should look like

i really dont know how to do it i register for this class because it is required to take it
my major is mechanical engineering technology i dont think i need this class at all

Best of luck...
Topic archived. No new replies allowed.