Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that generates an array of 10 elements filled up with random int

ID: 3621201 • Letter: W

Question

Write a program that generates an array of 10 elements filled up with random integer number ranging from 50 to 150, and display on the screen.

After the creation and displaying of the array, the program displays the following:

[A]verage           [E]ven            [M]inimum           [Q]uit

please select an option:_

Then, if the user selects:

A (lowercase or uppercase): the program displays the mean value of the numbers contained in the array (2 decimal digits maximum).

E (lowercase or uppercase): The program displays only the even numbers (not indexes) of the array.

M (lowercase or uppercase): the program displays the minimum present in the array.

Q (lowercase or uppercase): the program exits.

I'm new to Arrays, and need help in figuring out the code for this type of program

Please help,

thank you.

Explanation / Answer

#include #include #include using namespace std; int main() { int arr[10]; int i; char input; for (i = 0; i < 10; i++) { int x = rand()%(150 - 50) + 50; arr[i] = x; } do { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote