martes, 24 de septiembre de 2019

Programa 12 modificado

#include <iostream>
#include <stdio.h>

using namespace std;
void captura();
void impresion();
int vec[15],h,j;



int main()
{
  cout << "CAPTURAR EN UN VECTOR DE 15 POSICIONES" << endl;
  captura();
  impresion();

  cout << "FIN DEL PROGRAMA" << endl;

  return 0;

}

void captura()
{

    for (h=14; h>=0; h--)
    {
        cout << "INGRESA EL DATO" << endl;
        cin >> vec[h];
    }
}

void impresion()
{
for (j=14; j>=0; j--)
    {
        cout << vec[j] <<endl;
    }

}

No hay comentarios.:

Publicar un comentario