Question: Write a C++ program to analyze a variety of triangles. The program should determine all angles and all sides for a triangle for three different

Write a C++ program to analyze a variety of triangles. The program should determine all angles and all sides for a triangle for three different options (give the user a menu of choices):

Given two angles and one side

First check to be sure that the three values entered are valid. In particular, the following conditions must be met:

  • Side > 0
  • For each angle: 0 < angle < 180 (if angle is in radians, convert it to degrees first and then check)
  • For the sum of the two angles entered: 0 < Sum < 180 (if angles are in radians, convert them to degrees first and then check)

Example 2: If A = 30, B = 100, and a = 20, then Find the remaining angle: C = 180 - 30 - 100 = 50 Find the two remaining sides using the law of sines: sinAa = sinBb = sinCc sin3020 = sin100b= sin50c so b = asin(B)sin(A) = 20sin(100)sin(30) = 39.39 and c = asin(C)sin(A) = 20sin(50)sin(30) = 30.6

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!