Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C language puts the left and right elements less than 0 in the integer array in front of all the elements greater than 0.
C language puts the left and right elements less than 0 in the integer array in front of all the elements greater than 0.
# Contains? & ltstdio.h & gt

int? Major (invalid)

{

int? No. [10],? Me? j,? Temperature;

Fputs ("Please enter 10 integer? :?" ,? stdout);

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

scanf("%d ",num? +? I);

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

{

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

{

What if? (num[j]? & gt? num[j? +? 1])

{

Temporary workers? =? num[j];

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

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

}

}

}

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

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

putchar(' \ n ');

Return? 0;

}