#include <stdio.h>
#define EOL "\n"
int main( int argc, char* argv[] )
{
int arrInt[] = {9,2,3,11,22,111,23,8,7};
int size = sizeof(arrInt)/sizeof(arrInt[0]);
int i, j, tmp, in_order_cnt = 1;
for( i = 0; i < size && in_order_cnt; ++i )
{
in_order_cnt = 0;
for( j = 0; j < size - 1; ++j )
{
if( arrInt[j] > arrInt[j + 1])
{
tmp = arrInt[j];
arrInt[j] = arrInt[j + 1];
arrInt[j + 1] = tmp;
in_order_cnt = 1;
}
}
}
for( i = 0; i < size; ++i )
{
printf("%d\t", arrInt[i]);
}
printf(EOL);
return 0;
}