Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using c++ write a program that does the following. program should display a menu on the screen allowing the user to enter the size of

Using c++ write a program that does the following.

program should display a menu on the screen allowing the user to enter the size of an array or to terminate the program.

1) accepts array size from the keyboard. Size mist be a possitive integer that is >= 10 and <= 1000

2) use the size from step 1 in oder to creat an integer array. Populate the created array with random integer values between 10 and 1000 inclusive.

3) Display the first 10 elements of the generated array.

4)write a function that uses recursion in order to Display squares of integers in acending order, start from 1 to last number in the array

5) Write a function that uses recursion to raise a number to a power. the function should take two arguments, the number to be raised to the power is the first number in array and the power is 2.

6)write a recursive function that returns the maximum elements in the array

7)using Quick Sort, write a funtion that uses recursion to sort the array in decending order. calculate and print the CPU time before each step starts and after each completed step then calculate actual CPU time for the completion of each step. use the last value as a pivot value.

8) write a recursive function that takes an integer (first number in the sorted array ) as a paramater and returns the sum of digits of that integer.

9) write a recursive function that determines whether or not every number in the sorted array is a prime number.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions