Question: C++ 25+2.5+5+5 points] PROGRAMMING PROBLEM 1 Using four-step program development process, develop, run, and test a C++ program that uses a while loop to determine
25+2.5+5+5 points] PROGRAMMING PROBLEM 1 Using four-step program development process, develop, run, and test a C++ program that uses a while loop to determine the smallest integer power of 3 that exceeds 30,000. That is, find the smallest value of n so that 3" > 30,000. HINT: Initialize PowerOfThree = 1, and then recurse through the expression PowerOfThree- 3 *PowerOfThree 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 formulaT-rxFx sin 6, 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. IS +5 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
