Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose : This program demonstrates the use of one-dimensional arrays. An array of scores is read, printed, and the average of the scores is printed.

Purpose : This program demonstrates the use of one-dimensional arrays. An array of scores is read, printed, and the average of the scores is printed. ******************************************************************************/ #include #include #include //for the exit() function using namespace std; //function prototypes void ReadInScores (int scores[], int & howMany); float FindAverage(int scores[], int howMany); void PrintScores(int scores[], int howMany); int main() { //varible declaration const int MAX_SCORES = 30; //the array has at most 30 entries int scores [MAX_SCORES]; //an array of test scores with 30 entries int howMany; //the actual size of the array float averageScore; //the average of the scores array //activate the function to read the scores ReadInScores(scores, howMany); //activate the function to print the scores PrintScores(scores, howMany); //Place your activation statement for FindAverage() here //averageScore will be assigned from FindAverage cout<<"Average score is : "<

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions