Question: Please help. I've been struggling whit this assignment whole weekend. C++ Write a program that will calculate several different aspects of any triangle given the

 Please help. I've been struggling whit this assignment whole weekend. C++

Please help. I've been struggling whit this assignment whole weekend.

C++

Write a program that will calculate several different aspects of any triangle given the lengths of two of the sides (a and b) and the included angle (angle C). 1. Prompt the user to input two sides a and b, and the included angle C in degrees. 2. Draw a generic triangle using "/", "\", and "_". Display the two given sides on the left and right. Calculate and display the length of the third side below it to one decimal point of accuracy. (Use the printf() function e). 3. Calculate and display the following with 3 digit precision: a. Sides of the triangle. (Note: cos uses radians) i. Use the Law of Cosines > c2 = a2 + b2 - 2ab(cos C) 6. Angles of the triangle (display in degrees) (Note: sin uses radians) i. Use the Law of Sines -> asin A=b/sin B = c/sin C c. Perimeter d. Area - Hint: Use Heron's Formula 4. Use the printf() function to ensure that your decimal points and = signs are aligned. Example Output (input is in italics): -- Triangle Calculator -- Please enter the lengths of Sides a and b: 24 32 Please enter the size of Angle C in degrees: 115 A 1 1 / 24.0/ 32.0 / 47.4 24.000 = Side a 32.000 = Side b 47.425 = Sidec 27.300 = Angle A in degrees 37.700 = Angle B in degrees 115.000 = Angle C in degrees 103.425 = Perimeter 348.022 = Area

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!