Answer to Question #176492 in C++ for Luna

Question #176492

Write a program that will read an arbitrary number of sets of triangle sides using only integer values.

  1. side classification of the triangle – equilateral, isosceles, or scalene
  2. angle classification of the triangle – right, acute, or obtuse
  • c2 = a2 + b2  Right
  • c2  <  a2 + b2  Acute
  • c2  >  a2 + b2  Obtuse


You need to have functions at least for the following tasks:

  1. do the 3 side length form a triangle
  2. classify the triangle by side lengths
  3. classify the triangle as right or non-right triangle

Sample run:

Provide three side lengths – 0 0 0 to   terminate.

5

2

5

5 2 5   Triangle possible:  Isosceles and Acute.

Provide three side lengths – 0 0 0 to terminate .

-7

1

-7 1 2  Triangle cannot be formed.

Provide three side lengths – 0 0 0 to terminate. 

8

12

15 

8 12 15  Triangle possible: Scalene Obtuse.

Provide three side lengths – 0 0 0 to terminate.

0

0

0 0 0   Program was terminated by user.


1
Expert's answer
2021-03-31T11:29:11-0400
Dear Luna, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

lucas
30.03.21, 22:14

it doesn't work...

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS