Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

***The program must be easy to understand and different from the answers already posted*** Write a program that generates an array filled up with random

***The program must be easy to understand and different from the answers already posted***

Write a program that generates an array filled up with random positive integer number ranging from 15 to 20, and display it on the screen. After the creation and displaying of the array , the program displays the following:

[P]osition [R]everse, [A]verage, [S]earch, [Q]uit

Please select an option:

Then, if the user selects: -P (lowercase or uppercase): the program displays the array elements position and value pairs for all member elements of the array. -R (lowercase or uppercase): the program displays the reversed version of the array -A (lowercase or uppercase): the program calculates and displays the average of the array elements -S (lowercase or uppercase ): the program asks the user to insert an integer number and look for it in the array, returning the message wheher the number is found and its position ( including multiple occurences), or is not found. -Q (lowercase or uppercase): the program quits.

NOTE: Until the last option (q or Q) is selected, the main program comes back at the beginning, asking the user to insert a new integer number.

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Is how things are said consistent with what is said?

Answered: 1 week ago

Question

Do you currently have a team agreement?

Answered: 1 week ago

Question

c. How is trust demonstrated?

Answered: 1 week ago