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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY