lunes, 30 de septiembre de 2019

Programa 9 modificado

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

using namespace std;
void operaciones();
void impresion();
int vec[10],h,j,multiplo;


int main()
{
  cout << "MULTIPLOS DE 8" << endl;
  operaciones();
  impresion();

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

  return 0;

}

void operaciones()
{
    for (h=0; h<=9; h++)
    {
        multiplo= (h+1)*8;
        vec[h]=multiplo;
    }
}

void impresion()
{
     for (j=0; j<=9; j++)
    {
        cout << vec[j] <<endl;
    }
}

No hay comentarios.:

Publicar un comentario