Question: #include #include using namespace std; int main ( ) { int SIZE; / / number of elements to be stored in an array / /

#include
#include
using namespace std;
int main()
{
int SIZE; //number of elements to be stored in an array
//Prompt the user for an array size
cout << "Enter the size of an array:" << endl;
cin >> SIZE;
int nums[SIZE], frequency[10];
int index =0;
for(int i =0; i < SIZE; i++)
{
// TODO: Populate array with random numbers
}
cout <<"
Numbers in the array are: ";
for(int i =0; i < SIZE; i++)
{
cout << nums[i]<<"";
}
cout << endl;
//TODO: Determine the frequency of each number
//TODO: Determine the index of the number with the highest frequency
cout << "Number with highest frequency : "<< nums[index]<<" occurred "
<< frequency[index]<<" times" << endl;
return 0;
}

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 Programming Questions!