You are on page 1of 1

#include <iostream.

h>
#include<conio.h>
int main()
{
clrscr();
int a[5][5],b[5][5],c[5][5],d[5][5],m,n,p,q,i,j,k;
cout<<"Enter rows and columns of STIFFNESS MATRIX:\n";
cin>>m>>n;
cout<<"Enter rows and columns of LOAD MATRIX:\n";
cin>>p>>q;
cout<<"\nEnter STIFFNESS matrix rowwise:\n";
for(i=0;i<m;++i)
for(j=0;j<n;++j)
cin>>a[i][j];
cout<<"\nEnter LOAD matrix:\n";
for(i=0;i<p;++i)
for(j=0;j<q;++j)
cin>>b[i][j];
//Inverse of STIFFNESS MATRIX
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
c[i][j]=a[j][i];
}
}
//Find displacement matrix
cout<<"\n The displacement Matrix:\n\n";
for(i=0;i<m;++i)
{
for(j=0;j<q;++j)
{
d[i][j]=0;
for(k=0;k<n;++k)
d[i][j]=d[i][j]+(c[i][k]*b[k][j]);
cout<<d[i][j]<<" ";
}
cout<<"\n";
}
getch();
return 0;
}

You might also like