Question
Instructions : Write a C++ program reads three integer numbers from the user which represent the lengths of the sides of a triangle . Next
Instructions : Write a C++ program reads three integer numbers from the user which represent the lengths of the sides of a triangle . Next , determine whether the three lines can form a triangle or not . If the lines cannot form a triangle inform the user of this fact . If the lines can form a triangle , calculate the area of the triangle , and display it with 2 digits to the right of the decimal point . Methodology you must implement in your program : a ) To determine if the lines can form a triangle : The sum of lengths of any two sides must be greater than the length of the remaining side . Note that three lengths may be entered in any order . For example , you may not assume the first or the last length is the smallest or the largest. b ) The formula for the area of a triangle A, given the length of its sides: a, b, and c, is: A = sqrt(s(s - a)(s - b)(s - c)) Where s is the semi -perimeter :
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started