triangle, the sum of the lengths
In a triangle, the sum of the lengths of any two sides is greater than the length of the other third side. Write a c++ program that prompts a user to enter the lengths of three sides, check if they form a triangle, and outputs if it is an isosceles, equilateral, scalene, or right triangle where you have to define and use the following functions:
-
(a) isTriangle - takes 3 sides of a triangle and returns true if they form a triangle, false otherwise.
-
(b) isIsosceles-takes3sidesofatriangleandreturnstrueiftheyformanisosceles triangle, false otherwise.
-
(c) isEquilateral - takes 3 sides of a triangle and returns true if they form an equilateral triangle, false otherwise.
-
(d) isRight - takes 3 sides of a triangle and returns true if they form a right triangle, false otherwise.
You program should run repeatedly until the user wants to quit.
Step by step
Solved in 2 steps with 1 images