Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The purpose of this program is to identify the forces of each member of the trus

ID: 3689787 • Letter: T

Question

The purpose of this program is to identify the forces of each member of the truss below (F_AB, F_AD, F_BC, F_BD, F_BE, F_CE, F_D) and to state whether they are in tension or compression. Use the example we worked in class to determine the reaction forces (A A and C) and complete the analysis by the Method of Joints. Program Requirements: Using C++ (cout and cin) and the 10 equations below: Use CodeBlocks to build and run your program. Name your program: Lastname_Truss.cpp Your code should be properly commented to describe what you are doing. The user should be prompted to enter pitch width, x, height, h, and the applied forces F_1 and F_2. You must create and use a function to calculate the hypotenuse of the right triangle you will need to help determine x and y force components of the truss members. You must create and use a function to evaluate whether a force in Tension or Compression. The function will be called multiple times, once for each member. Any force value that has a magnitude from -0.00001

Explanation / Answer

#include<iostream.h>
#include<math.h>
#include<conio.h>
void main()
{
float x,y, F1,F2,Cy,Ay,Z,Fad,Fab,Fbd,Fde,Fbe,Fbc,Fce;
//prompt the user to enter pitch width x,height h and applied forces F1,F2
cout<<"Enter pitch width x height h, and the applied forces F1,F2";
   cin>>x>>y>>F1>>F2;
Cy=(((1/4)*F1)+((3/4)*F2));
Ay=(((3/4)*F1)+((1/4)*F2));
Z=sqrt(((1/4)*x*x)+h*h);
Fad=(-(z/h)*Ay);
Fab=((-x/(2z))*Fad);
Fbd=(-Fad-(z/h)*F1);
Fde=(x/2z*(Fad-Fbd));
Fbe=(-Fbd);
Fbc=Fab+(x/2z)*(Fbd-Fbe);
Fce=(-(z/h)*Cy);
if((Fad||Fab||Fbd||Fde||Fbe||Fbc||Fce)<0)
{
cout<<"Zero force member";
}
else if((Fad||Fab||Fbd||Fde||Fbe||Fbc||Fce)>=200)
{
cout<<" magnitude is compression";
}
else if((Fad||Fab||Fbd||Fde||Fbe||Fbc||Fce)<=150)
{
cout<<"magnitute is tension";

}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote