Question: 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 CountOccurances(int 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 FindMaxPos(int[] counts): This function finds the largest number in the list and returns the position where that number is in the list.
int FindMostCommon(int 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!