Cargar Vector Ordenado
void cargarVecOrd(int vec[], int &n, int x)
{
if(n == 0)
vec[n] = x;
else
{
if(vec[0]>x)
{
for(int i = n; i>0; i--)
vec[i] = vec[i-1];
vec[0] = x;
}
else if(vec[n-1]>x)
{
vec[n] = vec[n-1];
vec[n-1] = x;
}
else
vec[n] = x;
}
n++;
}