// 1a.cpp
#include <iostream>
using namespace std;
const int CAPACIDAD = 6;
typedef int Arreglo[CAPACIDAD];
void funcion(Arreglo arreglo, int indice_inicial);
int main() {
Arreglo arr = { 1, 3, 5, 7, 4, 2 };
funcion(arr, 0);
for (int j=0; j<CAPACIDAD; ++j)
cout<<arr[j]<<" ";
return 0;
}
void funcion(Arreglo arreglo, int indice_inicial) {
if (indice_inicial == CAPACIDAD-1)
return;
funcion(arreglo, indice_inicial + 1);
arreglo[indice_inicial] = max(arreglo[indice_inicial], arreglo[indice_inicial + 1]);
}