#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
using namespace std;

int main()
{
int i,j,pom,a,n;
//int tablica[12]={5,6,8,1,4,3,0,8,2,7,9,1};
cout<<"Podaj rozmiar tablicy"<<endl;
cin>>n;
int tablica[n];
srand(time(NULL));
for(int i=0;i<n;i++)
tablica[i]=rand()%n;

for(i=0;i<n;i++)
cout<<tablica[i]<<", ";
cout<<endl;
int nakt=n;

for(j=0;j<n-1;j++){
for(i=0;i<nakt-1;i++){
if (tablica[i]>tablica[i+1])
{

pom=tablica[i];
tablica[i]=tablica[i+1];
tablica[i+1]=pom;
}

}
nakt--;
}
for(i=0;i<n;i++)
cout<<tablica[i]<<", ";
return 0;
}