Question: The program uses an array to store the amount of money a game show contestant won in each of five days. The program should display

The program uses an array to store the amount of money a game show contestant won in each of five days. The program should display the total amount won and the average daily amount won. It should also display the day number (1 through 5) corresponding to the highest amount won. Complete the program. Save and then run the program. in c++

#include #include using namespace std;

//function prototypes void getTotal(); double getAvg(); int getHighDay();

int main() { int winnings[5] = {12500, 9000, 2400, 15600, 5400}; int total = 0; double average = 0.0; int highDay = 0;

cout << fixed << setprecision(2); cout << "Total amount won: $" << total << endl; cout << "Average daily amount won: $" << average << endl; cout << "The contestant's highest amount won was on day " << highDay << "." << endl; return 0; } //end of main function

//*****function definitions***** void getTotal() {

} //end of getTotal function

double getAvg() {

} //end of getAvg function

int getHighDay() {

} //end of getHighDay function

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!