Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ Programming Exercise Write a program that creates an array with nine integer numbers. The program will display the largest number. Modify the program
In C++
Programming Exercise Write a program that creates an array with nine integer numbers. The program will display the largest number. Modify the program so that it generates an array of nine integers randomly between 1- 100, then display its largest number. // main module Module main() // Declare a constant for the array size Constant Integer SIZE = 9 // Declare an integer array Declare Integer numbers[SIZE] -1, 2, Declare a variable to hold the largest number Declare Integer large // Find the largest number Set large = finaMax (numbers, 1, SIZE) // Show result Display "Largest number,large End Module // The findMax function accepts an array // and returns the largest value in the array. Function Integer findMaxInteger array[l, Integer start, Integer end) Declare Integer answer If start-= 1 then End If Set answer = array [start] If start > end then Return answer If arrayIstart] > ansier then End If else Set answer = array[start] Return findMax(array, start + 1, end) End If End FunctionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started