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
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