Project 11: Types of Triangles

Project 11: Given 3 side lengths of a triangle (a, b, c), the "triangle" can be classified into four categories.

First, remember that if the sum of any two sides is less than or equal to the third side then a triangle is not possible.  If a triangle is possible:

equilateral: all sides are the same

isosceles: exactly two sides are the same

scalene: no side lengths are the same

Task: Appropriately the variable 'category' where category is 1 if the triangle is not possible, 2 if the triangle is an equilateral, 3 if the triangle is an isosceles, and 4 if the triangle is scalene.

**If your code works for 5 test cases in a row, you can enter your e-mail address.

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0