Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Input of c-shaped array
Input of c-shaped array
# include & ltstdio.h & gt

Master ()

{

int num[20],t;

for(int I = 0; I & lt20; i++)

{

Printf ("input %d element \n", (I+1));

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

}

for(int I = 0; I & lt20; i++)

for(int j = 0; j & lt20-I; j++)

{

if(num[j]& gt; No. [j+ 1])

{ t = num[j];

num[j]= num[j+ 1];

num[j+ 1]= t; }

}

for(int I = 0; I & lt20; i++)

printf("%d ",num[I]);

//while( 1);

}