Prompt user to enter 20 integers Build an array that contains only one occurrenc
ID: 3614407 • Letter: P
Question
Prompt user to enter 20 integersBuild an array that contains only one occurrence of each uniqueinteger
Count the number of occurrences of each integer entered
Print a table listing each integer entered, and the number ofoccurrences
Example-
-4 -9 -4 0 0 0 1 1 2 100 100 100 100 13 13 13 13 13 -4 13
Unique list:
0 -4
1 -9
2 0
3 1
4 2
5 100
6 13
Frequency of integers:
Integer Occurrences
-4 3
-9 1
0 3
1 2
2 1
100 4
13 6
I don't need the whole program written out. I just need some tipson how to start and how to count the integers in the array. Anyideas?
Thanks! Will rate highest
Explanation / Answer
The strategy is: 1)We will check whether zero exists in the given array..if 0 existswe will count how many times it exists. code: for(int i=0; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.