#include <iostream>
#include <windows.h>
using namespace std;
void captura();
void imprimir();
void imprimetraspuesta();
void gotoxy(int x,int y){
HANDLE hcon;
hcon=GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwpos;
dwpos.X=x;
dwpos.Y=y;
SetConsoleCursorPosition(hcon,dwpos);
}
int matriz[3][4], x=5,y=8;
int main(){
captura();
imprimir();
imprimetraspuesta();
return 0;
}
void captura(){
for(int i=0; i<=2; i++){
for(int j=0; j<=3; j++){
gotoxy(y,x);
cin>>matriz[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
system("cls");
}
void imprimir(){
for(int i=0; i<=2; i++){
for(int j=0; j<=3; j++){
gotoxy(y,x);
cout<<matriz[i][j];
x+=5;
}
y+=2;
x=5;
}
system("pause");
system("cls");
}
void imprimetraspuesta(){
for(int i=0; i<=2; i++){
for(int j=0; j<=3; j++){
gotoxy(x,y);
cout<<matriz[i][j];
x+=5;
}
y+=2;
x=5;
}
}
No hay comentarios.:
Publicar un comentario