posted 9 years ago
Im writing a program that allows users to put in three sides of a triangle for 5 different triangles and then displays the type of type of triangle, perimeter of the triangle and total perimeter of all 5 triangles. The problem Im having is that the calculations for the total perimeter are off. It seems to be adding the perimeter of the last triangle twice. Also my program is supposed to set the values of the sides to 1 if the triangle is not a valid triangle, which it does, but that change is not reflected when displaying the type of triangle it is. Any help would be greatly appreciated! Here is what I have: