Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - All shapes are smaller than those in the array.
All shapes are smaller than those in the array.
# include & ltiostream & gt

Use namespace std

void min(int x[],int n);

int main()

{ int i,n;

Cout & lt& lt "Please enter total data"

CIN & gt; & gtn;

int * p 1 = new int[n];

Cout & lt& lt "Please enter data"

for(I = 0; I & ltn;; i++)

CIN & gt; & gtp 1[I];

}

min(p 1,n); //p 1, this should be the first address of the array, just change it.

}

void min(int x[],int n)

{ int I;

int * p2 = new int[n];

for(I = 0; I & ltn;; i++)

{ p2[I]= I;

}

for(I = 1; I & ltn;; i++)

{ if(x[I]& lt; x[0])

{ x[0]= x[I];

p2[0]= p2[I];

}

}

Cout & lt& lt "Minimum value is"

Return;

}