Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n = 2;
- cout << "Hello world!" << endl;
- cout << "DAMIAN UJMA CZESTOCHOWA" << endl;
- int A[n][n] = { {1,2},
- {3,4}};
- int B[n][n] = { {1,1},
- {1,1}};
- int C[n][n];
- for(int i = 0 ; i < n; i++){
- for(int j = 0; j < n; j++){
- C[i][j] = A[i][j] + B[i][j];
- }
- }
- for(int i = 0 ; i < n; i++){
- for(int j = 0; j < n; j++){
- cout << C[i][j];
- }
- cout << endl;
- }
- for(int i = 0 ; i < n; i++){
- for(int j = 0; j < n; j++){
- C[i][j] = A[i][j] + B[i][j];
- }
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement