Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions