-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
47 lines (34 loc) · 799 Bytes
/
main.cpp
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
41
42
43
44
45
46
47
#include <iostream>
#include "matrixType.h"
using namespace std;
int main()
{
matrixType matrix1(5, 5);
matrixType matrix2;
matrixType matrix3;
matrixType matrix4;
matrixType matrix5;
matrixType matrix6;
cout<<"VALUE FOR MATRIX1 : "<<endl;
cin>>matrix1;
cout<<"VALUE FOR MATRIX2 : "<<endl;
cin>>matrix2;
matrix1.printRow();
cout<<endl<<matrix1;
cout<<endl<<matrix2;
matrix3 = matrix2 + matrix1;
matrix4 = matrix2 * matrix1;
matrix5 = matrix4 - matrix1;
matrix6 = matrix2;
cout<<endl<<matrix3;
cout<<endl<<matrix4;
cout<<endl<<matrix5;
cout<<endl<<matrix6;
matrixType *ptr1;
matrixType *ptr2;
ptr1 = &matrix2;
ptr2 = &matrix6;
cout<<endl<<ptr1;
cout<<endl<<ptr2;
return 0;
}