Question: Use : if statement, loops Torsion occurs when an object is twisted due to an applied torque and is expressed in Pascals (Pa) or psi.

Use : if statement, loops  Use : if statement, loops Torsion occurs when an object is

Torsion occurs when an object is twisted due to an applied torque and is expressed in Pascals (Pa) or psi. Where D is the diameter of the rod in inches, P is the torsion load in pounds, and L is the offset (distance from the edge) in inches, the torsion shear stress is given by: T_s = 16PL/(pi D^3) ASSIGNMENT: Write a C program that will first allow the user to enter the diameter of the rod in inches. The program needs to ensure that the diameter of the rod is between 6 and 24 inches; if not, it should print an error message and continue to prompt the user until a value between 6 and 24 is entered. If the value is acceptable, the program should compute the shear stress given torsion loads of 7, 500 and 10,000 lbs at offsets of 15, 20, 25, ..., 50 inches. Use a while loop to control torsion load (initialize at 7500.0 and increment by 2500.0 to 10,000.0) and a nested for loop to control offset (initialize at 15.0 and increment by 5.0 to 50.0). The rod diameter, torsion load, offset, and shear stress should print to the screen. Your program output will look like the illustration shown below. Use your PC's cursor to determine the horizontal and vertical spacing for the output format. SAMPLE OUTPUT FORMAT: ******************************************** SHEAR STRESS OF A METALLIC MEMBER Enter rod diameter in inches: x Torsion load = 7500.0 lbs Offset (in) Shear Stress (psi) 15.0 xxxxx.x 20.0 xxxxx.x. .. ... 50.0 xxxxx.x Torsion load = 10000.0 lbs Offset (in) Shear Stress (psi) 15.0 xxxxx.x 20.0 xxxxx. .. ... 50.0 xxxxx.x *******************************************

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!