Answered step by step
Verified Expert Solution
Link Copied!

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++
please elaborate in simple terms as im a new learner...
image text in transcribed
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:
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems On GPUs In Databases

Authors: Johns Paul ,Shengliang Lu ,Bingsheng He

1st Edition

1680838482, 978-1680838480

More Books

Students also viewed these Databases questions