Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- using namespace std;
- int
- main ()
- {
- int n[3][3];
- int m[3][3];
- int a[3][3];
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- cout << "enter " << i << j << "element for n = ";
- cin >> n[i][j];
- cout << "enter " << i << j << "element for m = ";
- cin >> m[i][j];
- a[i][j] = n[i][j] + m[i][j];
- }
- }
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- cout << a[i][j] << " ";
- }
- cout << endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment