Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- const int n = 6;//Filas
- const int m =5;//Columnas
- int main (){
- int vectorA[n] = {0,0,0,0,0};
- 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}};
- cout<<"Vector A\n";
- for (int i=0; i<n; i++){
- cout<<vectorA[i]<<" ";
- }
- cout<<"\nMatriz A \n";
- for (int i=0; i<n; i++){
- for (int j=0; j<m; j++){
- cout<<matrizA[i][j]<<" ";
- }
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement