Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does sorting shape sorting?
How does sorting shape sorting?
# Including

empty

Master ()

{

Internationalorganizations (same as international organizations)

a[4][5],I,j,temp,k;

Printf ("Please

invest

this

Number: \ n ");

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

for(j = 0; j & lt5; j++)

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

printf(" \ n ");

/*

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

{

for(j = 0; j & lt5; j++)

printf("%d

“,a[I][j]); //Displays the original matrix.

printf(" \ n ");

}

*/

for(I = 0; I<5; I++)/* * five columns, and sort each column separately.

for(k = 0; k & lt3; k++)// 1

for(j = 0; j & lt3-k; j++)//2

1, Dasen Chicken 2 was sorted by bubbling method,

if(a[j][I]& gt; a[j+ 1][i])

{

temp = a[j][I];

a[j][I]= a[j+ 1][I];

a[j+ 1][I]= temp;

}

printf(" \ n ");

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

{

for(j = 0; j & lt5; j++)

printf("%-4d ",a[I][j]);

printf(" \ n ");

}

}