#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <fstream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
void sort(int tab[],int r)
{
int temp;
for(int k=0;k<r-1;k++)
{
for(int i=0;i<r-1;i++)
{
if(tab[i]>tab[i+1])
{
temp=tab[i];
tab[i]=tab[i+1];
tab[i+1]=temp;
}
}
}
}
int main(int argc, char** argv)
{
int r;
int tab[30];
srand(time(NULL));
for(int i=0;i<30;i++)
{
tab[i]=rand()%90+10;
cout<<tab[i]<<" ";
}
cout<<endl;
for(int k=0;k<30;k++)
{
sort(tab,30);
cout<<tab[k]<<" ";
}
return 0;
}