Question: please write solution using C++ program. Using Array to calculate the average of 5 grades: 1. read grade from user input. 2. read grades from

please write solution using C++ program.

Using Array to calculate the average of 5 grades:

1. read grade from user input.

2. read grades from the file.

// Hint:

const int ISIZE = 5, sales[ISIZE];

ifstream dataFile;

datafile.open("sales.dat");

if (!dataFile)

cout << "Error opening data file ";

else

{ // Input daily sales

for (int day = 0; day < ISIZE; day++)

dataFile >> sales[day];

dataFile.close();

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!