Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve this in 30 mins - the same output please Exercise 1 Exercise Objectives Recursive Array Processing Problem Description Use this project to write and

solve this in 30 mins - the same output please image text in transcribed
image text in transcribed
Exercise 1 Exercise Objectives Recursive Array Processing Problem Description Use this project to write and runa program that performs the following: Creates 6-element 1-D integer array named Numbers. o Fill the array with random values between (2 and 12), each run should give new random values and prints them in tabular format as in the sample output Pass the array to a function called findHighest that finds the maximum number in the array recursively and return it to the main. (don't use predefined functions to find the max) o Pass the array to function called findlowest that finds the minimum number in the array recursively and return it to the main. (don't use predefined functions to find the min) O Pass the max and min numbers to a recursive function called find GCD that finds the Greatest Common Divisor (GCD and return it to the main Note: Greatest Common Divisor (GCD) for two positive integers a and b is the largest number d such that a/d and b/d doesn't have any remainder For example GCR(6.3) = 3 and GCD(6 10) = 2 Pass the max and min numbers to a recursive function called intDivision, which finds and returns the result of dividing the max with the min. The main function Prints the values of the maximum, minimum the GCD and the division in tabular form as shown in the sample output o Sample Output The array has been filled with 6 random numbers as following: Index 0 1 2 3 value 8 3 4 12 Pass the array to function called findlowest that finds the minimum number in the array recursively and return it to the main. (don't use predefined functions to find the min) Pass the max and min numbers to a recursive function called findGCD that finds the Greatest Common Divisor (GCD) and return it to the main. Note: Greatest Common Divisor (GCD) for two positive integers a and b is the largest number d such that a/d and b/d doesn't have any remainder For example GCD/6,3) = 3 and GCD(6,10) = 2 O Pass the max and min numbers to a recursive function called intDivision, which finds and returns the result of dividing the max with the min. The main function Prints the values of the maximum, minimum the GCD and the division in tabular form as shown in the sample output. Sample Output The array has been filled with 6 random numbers as following: Index 0 1 2 3 4 5 value 8 3 4 12 10 6 The Maximum number is: 12 The Minimum number is : 3 The GCD is: 3 The int divison is : 4

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Map a set of problem domain objects to an OODBMS format.

Answered: 1 week ago

Question

You work of

Answered: 1 week ago

Question

2. How can competencies be used in employee development?

Answered: 1 week ago