#include ‹ stdio.h ›
#include ‹ conio.h ›
#include ‹ math.h ›
class matrix
{
int a[4][4],b[4][4],i,j,x,y;
public:
void getvalues();
void displaysum();
};
void matrix::getvalues()
{
cout<<"Enter the size of the row and column ";
cin>>x>>y;
if(x!=y)
{
cout<<"The size of the row and column should be equal";
getch();
exit(0);
}
cout<<"Enter values for the matrix A\n";
for(i=0;i
for(j=0;j
cin>>a[i][j];
cout<<"Enter the values for matrix b\n";
for(i=0;i
for(j=0;j
cin>>b[i][j];
}
void matrix::displaysum()
{
cout<<"The sum of matrix A and B is\n";
for(i=0;i
{
for(j=0;j
cout<<<"\t";
cout<
}
}
int main()
{
clrscr();
matrix m;
m.getvalues();
m.displaysum();
getch();
}
#include
class matrix
{
int a[4][4],b[4][4],i,j,x,y;
public:
void getvalues();
void displaysum();
};
void matrix::getvalues()
{
cout<<"Enter the size of the row and column ";
cin>>x>>y;
if(x!=y)
{
cout<<"The size of the row and column should be equal";
getch();
exit(0);
}
cout<<"Enter values for the matrix A\n";
for(i=0;i
for(j=0;j
cin>>a[i][j];
cout<<"Enter the values for matrix b\n";
for(i=0;i
for(j=0;j
cin>>b[i][j];
}
void matrix::displaysum()
{
cout<<"The sum of matrix A and B is\n";
for(i=0;i
{
for(j=0;j
cout<<<"\t";
cout<
}
}
int main()
{
clrscr();
matrix m;
m.getvalues();
m.displaysum();
getch();
}
incmplte program submitted .............huhhhh....!!!!!!!!!!!!!!
ReplyDeletepls.....do full program with header file........
ReplyDeleteso i need complete program
ReplyDeleteExcellent work, a nice rough guide to get you started!
ReplyDeleteye kis angle se nice dikhta h..!! huhh..!!
DeleteAdha adhura program banake dal dia h....
i got it ........
ReplyDeleteincomplete
ReplyDelete#include
ReplyDelete#include
#include
i need a programme to add two matrix using two different class and subscript operator overloading example...
ReplyDeletepls sombdy post...
foool maaaaader
ReplyDelete