triangle, the sum of the lengths

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter14: Numerical Methods
Section: Chapter Questions
Problem 4PP
icon
Related questions
Question
100%

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:

  1. (a)  isTriangle - takes 3 sides of a triangle and returns true if they form a triangle, false otherwise.

  2. (b)  isIsosceles-takes3sidesofatriangleandreturnstrueiftheyformanisosceles triangle, false otherwise.

  3. (c)  isEquilateral - takes 3 sides of a triangle and returns true if they form an equilateral triangle, false otherwise.

  4. (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.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr