Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do in C++ A pipe is to be carried around the right-angled corner of two intersecting corridors. Suppose that the widths of the intersecting
Please do 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 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