Question: Please do so in C++ A pipe is to be carried around the right-angled corner of two intersecting corridors. Suppose that the widths of the
Please do so in C++


A pipe is to be carried around the right-angled corner of two intersecting corridors. Suppose that the widths of the intersecting hallways are measured in feet. In the example shown below, the widths happen to be 8 feet and 5 feet, respectively. Your objective is to find the length of the longest pipe, floored to the nearest foot, that can be carried level around the right-angled corridor. Specifications: Write a program that prompts the user to input the widths of both hallways. The vertical hallway is considered to be the first hallway, and the horizontal hallway the second hallway. The program should determine critical angle that constrains the length of the pipe that can be carried around the corner, and print the result in degrees using two values after the decimal point. The length of the pipe should be floored to the nearest foot and printed as well. FIGURE 7-22 Pipe problem The length of the longest pipe should be calculated using a function with the following function prototype /7 Calculates the length of longest pipe void longestPipe (double wHallwayl, double wHallway2, double &mTheta, double &mLength) The function returns the maximum theta and length values. Assume 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
