Question: Write C++ code to: (9 points)Create a function called avgArray that: Accepts an integer array and its size as input. Returns the average of the

Write C++ code to: (9 points)Create a function called "avgArray" that:

Accepts an integer array and its size as input.

Returns the average of the values in the array.

Create a main function that:

Defines a three-element integer array initialized with the point values of the three questions on this quiz (not counting extra credit).

Calls your avgArray function with that array.

Display the average

Extra Credit: Create a storeArray function that:

Accepts an integer array its size as input, and a string filename as input.

Fills the array with the values read from a file.

Make sure the code is not that advanced. I'm in highschool

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 Programming Questions!