Matrix Class

2
class matrix { int m[10][10]; int s; public: matrix(int n) { s=n; } void mread() { int i,j; for(i=0;i<s;i++) for(j=0;j<s;j++) cin>>m[i][j]; } void show() { int i,j; for(i=0;i<s;i++) { for(j=0;j<s;j++) cout<<m[i][j]; cout<<endl; } }

description

to add two matrices

Transcript of Matrix Class

class matrix{ int m[10][10]; int s; public: matrix(int n) { s=n; } void mread() { int i,j; for(i=0;im[i][j]; } void show() { int i,j; for(i=0;i