Q15 If the lengths of the sides of a triangle are denoted by a, b, c, then area of triangle is given by area = √(S(S-a)(S-b)(S-c)) Where, S = (a+b+c)/2. Write a function to calculate the area of the triangle.

Program: 136

If the lengths of the sides of a triangle are denoted by a, b, c, then area of triangle is given by


area = √(S(S-a)(S-b)(S-c))
Where, S = (a+b+c)/2.


Write a c function to calculate the area of the triangle.

Output:

Enter a: 3
Enter b: 2
Enter c: 4
Area of Triangle: 2.904737

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.