Advertisement
Guest User

camila

a guest
Sep 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. const int n = 6;//Filas
  4. const int m =5;//Columnas
  5. int main (){
  6. int vectorA[n] = {0,0,0,0,0};
  7. int matrizA[n][m] = {{2,2,2,2,2}, {1,1,1,1,1}, {2,2,2,2,2},{1,1,1,1,1},{2,2,2,2,2},{2,2,2,2,2}};
  8. cout<<"Vector A\n";
  9. for (int i=0; i<n; i++){
  10. cout<<vectorA[i]<<" ";
  11. }
  12. cout<<"\nMatriz A \n";
  13. for (int i=0; i<n; i++){
  14. for (int j=0; j<m; j++){
  15. cout<<matrizA[i][j]<<" ";
  16. }
  17. cout<<endl;
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement