Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int grid[3][4] = {{2,7,4,8}, {3,1,9,2}, {7,5,1,6}};
- cout <<"Matrix 1 \n"<<endl;
- for(int i=0; i<3; ++i)
- {
- for(int j=0; j<4; ++j)
- {
- cout<<grid[i][j]<<" ";
- }cout<<endl<<endl;
- }
- int user [2][3], m, n;
- cout<<"Enter (2X3) integer "<<endl;
- for (m=0; m<2; ++m)
- for (n=0; n<3; ++n)
- cin>>user[m][n];
- cout<<"\nMatrix 2 \n"<<endl;
- for (m=0; m<2; ++m){
- for (n=0; n<3; ++n){
- cout<<user[m][n]<<" ";
- }cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement