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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started