Question: Write a C++ program to analyze a triangle along with its inscribed and circumscribed circles. The program should do the following: prompt for the length

Write a C++ program to analyze a triangle along with its inscribed and circumscribed circles. The program should do the following:

prompt for the length of the 3 sides of a triangle, and then...

check to be sure that the three sides entered form a valid triangle.

For the triangle to be valid, 6 conditions must be met:

o a > 0, b > 0, c > 0

o a

If any bad inputs are entered, print out an appropriate descriptive error message and terminate the program

using the command: return 1; Bad inputs include invalid triangles, sides, or menu choices. For Example:

if (Side

Return 1; }

If inputs are valid, the program should provide a menu and prompt for user preference (indicated by a simple number) of the following options:

Option 1: Find the 3 angles of the triangle, and the triangle area.

Write a C++ program to analyze a triangle along with its inscribed

and circumscribed circles. The program should do the following: prompt for the

Option 2: Find the largest incircle radius, and the remaining interior area of the triangle.

Note: The largest circle inscribed inside a triangle is called a incircle, and is tangent to all three sides.

length of the 3 sides of a triangle, and then... check to

Option 3: Find the circumcircle radius, and the remaining interior area of the circumcircle.

Note: The unique circle circumscribed on the outside of a triangle that includes all 3 triangle corners is called a circumcircle.

be sure that the three sides entered form a valid triangle. For

the triangle to be valid, 6 conditions must be met: o a

> 0, b > 0, c > 0 o a If any

Example la: If a 20, b 15, c 10, then Find angle A using the law of cosines b2 c 2.b.c cos(A) 20 152 10 2 (15) (10) cos(A) 152 10 20 A cos 2 C15).(10) A -104.48 Find angle B using the law of cosines b2 -a2 c 2.a.c.cos(B) 15 202 10 -2. (20). 10), cos(B) 202 10 15 B cos 2 (20). (10) B 46.57 Find angle C: C-180 A B-180 104.48- 46.57 -28.95

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!