Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ using DevC++ please elaborate in simple terms as im a new learner... please perform the following tasks in your program; - read the lengths
C++ using DevC++
A text file, length.txt has the following information: In a triangle, the sum of any two-sided is always greater than the third side. Write a program that reads/ the length of three lines from length. txt file. It then determines whether the three lines can be used to construct a triangle. If a triangle can be constructed, compute the area of the triangle. Note that the area of a triangle can be calculated using the following formula, area=s(sa)(sb)(sc) where a,b and c are the length of the sides; and s is calculated as follow s=2(a+b+c) 345Area=6.0000 286 Can't form a trianglel please elaborate in simple terms as im a new learner...
please perform the following tasks in your program;
- read the lengths from length.txt file and display the value.
- determine whether a triangle is possible. (use statement: if(a+b>c && a+c>b && b+c>a) ).
- calculate the area using calc_area() function (programmer defined function).
- display the area of triangle in main(). set the display output to 4 decimal places of precision. if the expression of the if is false, it cant form a triangle, display " Can't form a triangle" at the area of the triangle.
Eg:
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