Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started