Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Statement: Finding the repeated elements in anarray You are required to

ID: 3618503 • Letter: P

Question

Problem Statement: Finding the repeated elements in anarray

You are required to write a program that takes 10 integer valuesin an array as input from user. After getting input, the programshould find the elements with repetition and number of times eachelement is repeated.

Detailed Description:

1. Declare an integer type array.

2. Take input from user in the array i.e. 10 integervalues.

3. Pass this array to a function which will calculate anddisplay the number of times an element is repeated.

4. If the array contains elements with repetition, theprogram should only display the repeated elements and theircount.

5. If there is no repetition in the array, the programshould simply display the message “There is no repetition inthe array”.

Sample Output 1

Enter the value of array element 1 : 8

Enter the value of array element 2 : 6

Enter the value of array element 3 : 2

Enter the value of array element 4 : 4

Enter the value of array element 5 : 2

Enter the value of array element 6 : 2

Enter the value of array element 7 : 7

Enter the value of array element 8 : 8

Enter the value of array element 9 : 5

Enter the value of array element 10 : 6

  

2 is repeated 3 times

6 is repeated 2 times

8 is repeated 2 times

Sample Output 2

Enter the value of array element 1 : 1

Enter the value of array element 2 : 3

Enter the value of array element 3 : 8

Enter the value of array element 4 : 7

Enter the value of array element 5 : 4

Enter the value of array element 6 : 9

Enter the value of array element 7 : 6

Enter the value of array element 8 : 5

Enter the value of array element 9 : 0

Enter the value of array element 10 : 2

Explanation / Answer

please rate - thanks you didn't specify the range of the numbers that can be input, Imade it any number--would have been much simpler for the numbers 0to 9 only #include using namespace std; void finddups(int[],int); int main() {int a[10],i; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote