Question: a) Construct a flow chart diagram based on the c++ code above int beamType; float load, length, elasticity, momentofInertia,a,deflection; printf(1. Cantilever beam with concentrated load

 a) Construct a flow chart diagram based on the c++ code

a) Construct a flow chart diagram based on the c++ code above

int beamType; float load, length, elasticity, momentofInertia,a,deflection; printf("1. Cantilever beam with concentrated load at free end."); printf(" 2. Beam having uniformly distributed load."); printf(" 3. Cantilever beam with concentrated load at any distance."); printf(" 4. Simply supported beam having load at the center of the beam."); printf(" 5. Simply supported beam with uniformly distributed load."); printf(" Choose beam type: "); scanf("%d",&beamType); printf("Enter load: "); scanf("%f", &load); printf("Enter length: "); scanf("%f",&length); printf("Enter elasticity: "); scanf("%f", &elasticity); printf("Enter moment of inertia: "); scanf("%f", &momentofInertia); switch (beamType) { case 1: deflection=(load pow (length, 3))/(elasticity*momentOfInertia); break; case 2: deflection=(load pow(length, 4))/(8 elasticity momentofInertia); break; case 3: printf(" Enter distance from fixed part of the beam: "); scanf("%f",&a); deflection=13*length-a) * (load pow(a,2))/(6*elasticity*momentofInertia); break; case 4: deflection=(load pow (length, 3))/(48*elasticity* momentofInertia); break; case 5: deflection=(5*load pow (length, 4))/(384*elasticity*momentOfInertia); break; default: printf ("Wrong choice."); } printf(" Maximum deflection is: $.2f", deflection); return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!