Write a program to find the area of a triangle given three sides.
Answers
Answered by
13
Answer:
Python program to find the area of a triangle
# Three sides of the triangle is a, b and c:
a = float(input('Enter first side: '))
b = float(input('Enter second side: '))
c = float(input('Enter third side: '))
# calculate the semi-perimeter.
s = (a + b + c) / 2.
# calculate the area.
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5.
Answered by
1
Answer:
Read the answer nd than write
Explanation:
This C Program calculates the area of a triangle given it's three sides. The formula or algorithm used is: Area = sqrt(s(s – a)(s – b)(s – c)), where s = (a + b + c) / 2 or perimeter / 2. and a, b & c are the sides of triangle. Here is source code of the C program to calculate the area of a triangle.
Hope this helps you out
Similar questions