Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language: input a five-line plastic array, find out the largest and smallest in the array and print it out.
C language: input a five-line plastic array, find out the largest and smallest in the array and print it out.
# include & ltiostream.h & gt

int main()

{

int a[5],I,max,min

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

CIN & gt; & gta[I];

max = a[0];

min = a[0];

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

{ if(a[I]& gt; Max)

max = a[I];

if(a[I]& lt; Minimum)

min = a[I]; }

cout & lt& ltmax & lt& lt" " " & lt& ltmin & lt& ltendl

System ("suspended");

Returns 0;

}