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
|
#include <iostream>
#include<windows.h>
#include <cmath>
#include <string>
using namespace std;
int main()
{
float x1, x2, x3, y1, y2, y3, y4;
float a1, a2, a3, b1, b2, b3, c1, c2, c3;
float area, l1, l2, l3, si1, si2, si3, fi1, fi2, fi3, fi4, fi5, fi6;
float d[6][6];
float m[6][6];
float k[6][6]= {{1,0,0,-1,0,-1},{0,1,0,-1,-1,0},{0,0,1,0,-1,-1},{0,0,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};
float s[6][6]={{1,0,0,0,0,0},{0,1,0,0,0,0},{0,0,1,0,0,0},{-1,-1,0,0,0,0},{0,-1,-1,0,0,0},{-1,0,-1,0,0,0}};
cout<<" Transpose of Matrix [A]= "<<"\n\n";
for (int i=1; i<=6; ++i)
{
for(int j=1; j<=6; ++j)
{k[i][j]==0;
cout<<k[i][j]<<" "<<"\t";
}
cout<<"\n\n";
}
//******************************************************
cout<<"\t\t Value of Mass Matrix :"<<"\n\n";
for(int i=1; i<=6; i++)
{for(int j=1; j<=6; j++)
{d[i][j]=k[i][j]*s[j][i]+d[i][j];
cout<<"\t\t"<<d[i][j];
}cout<<"\n";}
cin>>c3;
return 0;
}
|