Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program that will allow the user to enter the size of the list, and the Max range of the random number. The program
Create a program that will allow the user to enter the size of the list, and the Max range of the random number. The program will then create an array that particular size filled with random numbers that do not exceed the Max range entered.
The program will then calculate the most common random number and how many times it occurred.
You will need to include the following methods:
int CountOccurancesint number, int randomList: This method will take a given number, and return the count of how many times that numbers exists in the array.
int FindMaxPosint counts: This function finds the largest number in the list and returns the position where that number is in the list.
int FindMostCommonint maxRange, int randomList: This method will take parameters of the Max range of the random number, and the list. It will return the number that most commonly occurs within the array.
Step 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