subject

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.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:20, LuchaPug
Write the pseudocode for the following: a function called fahrenheittocelsius that accepts a real fahrenheit temperature, performs the conversion, and returns the real celsius temperature. a function called celsiustofahrenheit that accepts a real celsius temperature, performs the conversion, and returns the real fahrenheit temperature. a main module that asks user to enter a fahrenheit temperature, calls the fahrenheittocelsius function, and displays the celsius temperature with a user-friendly message. it then asks the user to enter a celsius temperature, calls the celsiustofahrenheit function, and displays the fahrenheit temperature with a user-friendly message.
Answers: 1
image
Computers and Technology, 22.06.2019 00:00, ajwiebel3475
Which requirement is an appropriate reason for a business to use it tools
Answers: 3
image
Computers and Technology, 22.06.2019 08:00, wgdelgado
What is the first step in creating a maintenance ?
Answers: 2
image
Computers and Technology, 22.06.2019 15:10, AleciaCassidy
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
You know the right answer?
Write a program that generates an array filled up with random positive integer number ranging from...

Questions in other subjects:

Konu
Social Studies, 16.11.2020 16:40