Question: In C++ please!! Write a program that will fill an integer array with random values. Then, the user will be given the choice to see:
In C++ please!!
Write a program that will fill an integer array with random values. Then, the user will be given the choice to see: 1) the average, 2) the value in a cell indicated by the user, or 3) the odd numbers in the array. The options should be presented as a menu, with a fourth choice that would be to end the program, without performing any of the operations.
Prototypes:
void intro(); // a description of what the program will do
void menu(); // displays the menu
void fillArray(int[]); // fills the array with random values in the range 0 - 199
int getChoice(); // prompts the user to enter a menu choico & returns that choice
void computeAverage (int[]); // computes & displays the average of values in the array
void displayOne(int, int[ ]); // the displays the value in the cell indicated by the user
void showOdds(int[]): // displays the odd values in the array (referring to the actual values, not the cell numbers)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
