#include <iostream>
#include <cstdlib> //srand(), rand()
#include <ctime> //time()
using namespace std;
const int NUM=15;
void burbuja(int v[NUM])
{
int i, j, aux;
for (i=0; i<NUM-1; i++)
for (j=0; j<NUM-1-i; j++)
if (v[j] > v[j+1])
{
aux=v[j];
v[j]=v[j+1];
v[j+1]=aux;
}
}
void imprimir(int v[NUM])
{
for(int i=0; i<NUM; i++)
cout<<v[i]<<endl;
}
int main()
{
int i, v[NUM], c[NUM];
srand(time(NULL));
for(i=0; i<NUM; i++)
{
v[i]=rand()%10+1;
c[i]=v[i];
}
burbuja(v);
cout<<"Vector original"<<endl;
imprimir(c);
cout<<"Vector ordenado"<<endl;
imprimir(v);
return 0;
}