Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Define an integer array a[ 10] Initialize the array: keyboard input numerical bubble sort output array data: 0-9 element values of numerical value A.
Define an integer array a[ 10] Initialize the array: keyboard input numerical bubble sort output array data: 0-9 element values of numerical value A.
The code is as follows:

# Contains? & ltstdio.h & gt

# Contains? & ltstdlib.h & gt

# Definition? n? 10

int? Master ()

{

int? Data [N],? Me? j,? Temperature;

//? invest

For what? (me? =? 0; ? Me? & lt? n; ? i++)

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

//? bubble sort

For what? (me? =? 0; ? Me? & lt? n? -? 1; ? i++)

For what? (j? =? 0; ? j? & lt? n? -? Me? -? 1; ? j++)

What if? (data [j]? & gt? Data [j? +? 1])? {

Temporary workers? =? data[j];

Data [j]? =? Data [j? +? 1];

Data [j? +? 1]? =? Temperature;

}

//? output

For what? (me? =? 0; ? Me? & lt? n; ? i++)

printf("%d?" ,? data[I]);

printf(" \ n ");

System ("suspended");

Return? 0;

} Running result: