Question: C++ PROGRAMMING PROBLEM 2 Torque (or moment) is a measure of the twisting force on an object-for example, applying force to a wrench's handle to
PROGRAMMING PROBLEM 2 Torque (or moment) is a measure of the twisting force on an object-for example, applying force to a wrench's handle to tighten or loosen a bolt or nut. Torque, T in N-m or ft-lbf, is calculated using the formula T = r F sin , where r is the level length in m or ft, F is the applied force in N or lbf, and 0 is the angle between the lever and applied force in radians. (a) Using this formula and the four-step development strategy, write a function named void torque (double dist, double force, double angle) that accepts the length of a wrench, the force applied, and the angle between the wrench and force in degrees. The function should convert the angle to radians (using 180 degrees = radians), calculate the applied torque, and displays the computed value. 2.5+2.5+5 points] (b) Include the function, written in part (a), in a working program. Make sure your function is called from int main (. Test the function by passing various data in it. 15+5 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
