Task: I have a file with grading information about my students. The file has one line per student, and each line is formatted as follows:
Lastname Firstname Test1 Test2 Test3 Test4
Your task is to write a progam that will use the input file to figure out the test average for each student in the class. Your program should also figure out the class average on each test, as well as the overall test average for the entire class on all four tests. This information should be stored in an output file with the student's name followed by their test average. At the end of the file should be the class averages.
To further make you practice loops, you are not allowed to use more than one variable for the individual test scores. In other words, you can't say:
infile >> test1 >> test2 >> test3 >> test4;
You can only say:
infile >> test;
Purpose: To practice using loops and files, which most people commented they needed extra practice on.