Advertisement
Diego1764

PROGRAMA MATRICES

Feb 3rd, 2022
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.     int numeros[4][4];
  8.     for(int i=0;i<4;i++){
  9.         for(int j=0;j<4;j++){
  10.             cout<<"Digite un numero ["<<i<<"]["<<j<<"]: ";
  11.             cin>>numeros[i][j];
  12.         }
  13.     }
  14.     cout<<"\nMatriz Original\n";
  15.     for(int i=0;i<4;i++){
  16.         for(int j=0;j<4;j++){
  17.             cout<<numeros[i][j]<<" ";
  18.         }
  19.         cout<<"\n";
  20.     }
  21.     cout<<"\nMatriz Transpuesta\n";
  22.     for(int i=0;i<4;i++){
  23.         for(int j=0;j<4;j++){
  24.             cout<<numeros[j][i]<<" ";
  25.         }
  26.         cout<<"\n";
  27.     }
  28.     getch();
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement