Write a program calculating the area of a triangle with the length of the three sides as a, b, c, given by:   where s is the semi-perimeter of the triangle,   The perimeter of the triangle is given by P = a+b+c. Note: Use #include  preprocessor directive use the sqrt() function.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.5: A Closer Look: Loop Programming Techniques
Problem 7E
icon
Related questions
Question

 Write a program calculating the area of a triangle with the length of the three sides as a, b, c, given by:

 

where s is the semi-perimeter of the triangle,

 

The perimeter of the triangle is given by P = a+b+c.

Note: Use #include <math.h> preprocessor directive use the sqrt() function.

a+b+c
= S
2
Transcribed Image Text:a+b+c = S 2
A=/s * (s – a)
* (s — b) * (s — с)
Transcribed Image Text:A=/s * (s – a) * (s — b) * (s — с)
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,