Programming Assignment #1 INSTRUCTION: Given an angle "theta" (less than 90 degrees) and a hypotenuse length (H) from the user, calculate the lengths of the opposite (O) and adjacent (A) sides of a right triangle. Also calculate the area of the triangle and output all results to the screen. You should also ask the user which unit of measure (cm, meters, inches, feet) should be used. The precision of the output values should be 4 significant digits. you must use the PI = 3.14159265 or your output will not match the solution. You will need to use some trigonometric functions to calculate O and A in your program. They are found in "cmath" you may visit the link for a complete description and syntax for using the cmath library: https://www.cplusplus.com/reference/cmath/ You must include your Algorithm steps in the comment block like this: /* Step 1. Step 2. Step 3. …Algorithm completed */ Your output should have values posted on 3 separate lines. Example: cout << "The length of the adjacent side is: " << adjacentLength << ' ' << unitMeasure << endl; cout << "The length of the opposite side is: " << oppositeLength << ' ' << unitMeasure << endl; cout << "The area of the triangle is: " << areaTriangle << ' ' << unitMeasure << endl; Given an angle "theta" (less than 90 deg) and hypotenuse length from the user, calculate the lengths of the opposite and adjacent lengths of a right triangle. Also calculate the area of the triangle and output all results to the screen. The units of measure (cm, meters, inches, feet) should be determined by the user input and included in the output. The precision of the output should be 4 significant digits You must include your Algorithm steps in the comment section like this: Step 1. Step 2. Step 3. ...Algorithm completed *******************************************************************************/ // start your code here.... const double PI = 3.14159265; Write in C++. Please and Thank You.
Programming Assignment #1 INSTRUCTION: Given an angle "theta" (less than 90 degrees) and a hypotenuse length (H) from the user, calculate the lengths of the opposite (O) and adjacent (A) sides of a right triangle. Also calculate the area of the triangle and output all results to the screen. You should also ask the user which unit of measure (cm, meters, inches, feet) should be used. The precision of the output values should be 4 significant digits. you must use the PI = 3.14159265 or your output will not match the solution.
You will need to use some trigonometric functions to calculate O and A in your program. They are found in "cmath" you may visit the link for a complete description and syntax for using the cmath library: https://www.cplusplus.com/reference/cmath/
You must include your
Your output should have values posted on 3 separate lines. Example: cout << "The length of the adjacent side is: " << adjacentLength << ' ' << unitMeasure << endl; cout << "The length of the opposite side is: " << oppositeLength << ' ' << unitMeasure << endl; cout << "The area of the triangle is: " << areaTriangle << ' ' << unitMeasure << endl;
Given an angle "theta" (less than 90 deg) and hypotenuse length from the user,
calculate the lengths of the opposite and adjacent lengths of a right triangle.
Also calculate the area of the triangle and output all results to the screen.
The units of measure (cm, meters, inches, feet) should be determined by the user
input and included in the output. The precision of the output should be 4 significant digits
You must include your Algorithm steps in the comment section like this:
Step 1.
Step 2.
Step 3.
...Algorithm completed
*******************************************************************************/
// start your code here....
const double PI = 3.14159265;
Write in C++. Please and Thank You.
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)