Question: Write a C++ program to calculate students' averages test scores and their grades using the following input and the call functions that follow the input
Write a C++ program to calculate students' averages test scores and their grades using the following input and the call functions that follow the input array. Please use three arrays: one to store the students namea, a (parallel) two dimensional array to store the test scores, and a parallel one-dimensional array to store the grades. Have the program output the class average as well.
Input (use fstream input file):
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 30 69 87
====Call functions follow===
getData(inFile, names, testData, 10);
calculateAverage(testData, 10); calculateGrade(testData, grade, 10); print(names, testData, grade, 10);
inFile.close();
return 0; }
void getData(ifstream& inf, string n[], double tstData[][6], int count) {
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
