martes, 5 de noviembre de 2019

Matriz 1

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

using namespace std;

void captura();
void imprime();

int mat[5][5];

int main(){
captura();
imprime();
system("pause");
return 0;

}

void captura(){
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
cout<<"Captura un numero:";

cin>>mat[i][j];

 }
}
 }
void imprime(){
for(int i=0; i<=4; i++){
for(int j=0; j<=4; j++){
cout<<"El numero en la posicion "<<i<<j<<" es"<<mat[i][j]<<endl;

 }
}
 }

No hay comentarios.:

Publicar un comentario