Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C++ Programming Problem: Finding the Maximum Value of Plastic Array
C++ Programming Problem: Finding the Maximum Value of Plastic Array
# include & ltstdio.h & gt

void main()

{

int a[ 10],I;

Printf ("Please enter ten digits: \ n"); /* I simply set it to ten numbers here */

for(I = 0; I< 10; i++)

scanf("%d ",& ampa[I]);

int max=a[0],min = a[0];

for(I = 1; I< 10; i++)

{

if(max & lt; a[i])

max = a[I];

}

for(I = 1; I< 10; i++)

{

if(min & gt; a[i])

min = a[I];

}

Printf ("Maximum number is %d\n", max);

Printf ("the smallest number is %d\n", min);

}