#include <bits/stdc++.h>
using namespace std;

const int n=100;

int main()
{
    int *A=(int*) malloc(n*sizeof(int));
    srand(time(NULL));
    for(int i=0; i<n; i++){
        A[i]=rand()%50*10;
    }

    cout<<"Vetor aleatorio.";
    for(int i=0; i<n; i++){
        cout<< A[i]<<" ";
    }

    for(int i=0; i < (n-1); i++){
        for(int j=0; j < (n-i-1); j++){
            if(A[j] > A[j+1]){
                int aux=A[j];
                A[j]=A[j+1];
                A[j+1]=aux;
            }
        }
    }

    cout<<"Vetor ordenado:\n";
    for(int i=0; i<n; i++){
        cout<<A[i]<<" ";
    }

    return 0;
}
