Question: - Copy and paste the code below in a filename LastFirst_lab71a.cpp (e.g. DoeJoe_lab71.cpp) and save it in Lab 7 folder. - Bring in the LastFirst_lab71a.cpp
- Copy and paste the code below in a filename LastFirst_lab71a.cpp (e.g. DoeJoe_lab71.cpp) and save it in Lab 7 folder.
- Bring in the LastFirst_lab71a.cpp program from the Lab 7 folder.
- Complete this program as directed.
- Run the program with the following data: 90 45 73 62 -99
- Copy and paste the output into the end of the .cpp file (and comment it out) OR if using a Mac, take a screen shot of the output and save in a Word document (e.g. DoeJoe_lab71.doc)
- Save the program, THEN "Save as" LastFirst_lab71b.cpp
- Copy and paste the data below in a filename gradfile.txt and save it in Lab 7 folder, OR wherever your latest.cpp file is saved for executing.

- Modify your program (version B) so that it reads the information from the gradfile.txt file, reading until the end of file is encountered. You will need to first retrieve this file from the Lab 7 folder and place it in the same folder as your C++ source code. Run the program.
The following is the code to be used:
// This program will read in a group of test scores( positive integers from 1 to 100) // from the keyboard and then calculates and outputs the average score // as well as the highest and lowest score. There will be a maximum of 100 scores. #include using namespace std; const int ARRAY_SIZE=100; float findAverage (int array[], int size); // finds average of all grades int findHighest (int array[], int size); // finds highest of all grades int findLowest (int array[], int size); // finds lowest of all grades int main() { int grades[ARRAY_SIZE]; // the array holding the grades. int temp; // variable for the input number int numberOfGrades; // the number of grades read. int pos; // index to the array. float avgOfGrades; // contains the average of the grades. int highestGrade; // contains the highest grade. int lowestGrade; // contains the lowest grade. cout > temp; pos=0 while(pos 21 90 532 62 05312 94726 Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
