-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (34 loc) · 719 Bytes
/
main.cpp
File metadata and controls
40 lines (34 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include<iostream>
using namespace std;
int main()
{
int First[3][3];
int Second[3 ][3];
int sum[3][3];
cout << "Input the enteries of 1st 3*3 matrix" << endl;
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
cin >> First[i][j];
}
cout << "Enter the entries of 2nd 3*3 matricx" << endl;
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
cin >> Second[i][j];
}
for ( int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
sum [i][j]= First[i][j] + Second[i][j];
cout << endl;
cout << "The sum of Resultant Matrix is " << endl;
for ( int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
cout << sum[i][j]<<" ";
}
cout <<endl;
}
system("pause>0");
}