#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int x = 10, luvut[x], i, j, k, v;
for ( k = 0 ; k < x ; k++ ) {
luvut[k] = x-k-1;
cout << luvut[k] << " ";
}
cout << endl;
for ( i = 0 ; i < x ; i++ ) {
for ( j = 0 ; j < i ; j++ ) {
if ( luvut[j] > luvut[i] ) {
v = luvut[j];
luvut[j] = luvut[i];
luvut[i] = v;
} cout << i << " " << j << " | ";for(k=0;k<x;k++)cout<<luvut[k]<<" ";cout<<endl;
} cout << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}