jueves, 14 de noviembre de 2019

Programa 14 (Parte 2)

Programa 14 (Parte 2)

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

using namespace std;

void captura();
void imprime();

int mat[5][5],f,c;
int main()
{
    captura();
    imprime();
    return 0;
}

void captura()
{
    for(f=0; f<=4; f++)
        for(c=0; c<=4; c++)
    {
        cout <<"Captura un numero:  ";
        cin >> mat[f][c];
    }
}
    void imprime()
    {
        for(f=0; f<=4; f++)
            for(c=0; c<=4; c++)
        {
            cout <<" El numero en la posicion " << f << c << "es" << mat[f][c] <<endl;
        }

    }

No hay comentarios.:

Publicar un comentario