Question: #include using namespace std; void CalcMeanMedianMinMax(int *p,int N) { float mean; int min=*p; int max=*p; // * indicates Pointer. int sum=0; for(int i=0;i

#include using namespace std; void CalcMeanMedianMinMax(int *p,int N) { float mean; int min=*p; int max=*p; // * indicates Pointer. int sum=0; for(int i=0;imax) max=*p; } cout<<"Minimum Val"<>N; int *p=new int(N); //Dynamic array creation. cout<<"Enter Elements in array "; for(int i=0;i>p[i]; cout<<"The elements in array are "; for (int i=0;i

I have written this above code. But in the function where it is supposed to find and print the duplicates of the array there is a glitch.

The glitch is when i enter for example 5 elements and give them as 23,23,23,45,45 the output of the duplicates gives 23,23,23 instead of just printing 23 once. I need you to solve this glitch and fix the code. ( pointer should be used to find the duplicate as above)

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!