Computer Science, asked by ashutoshpastor123, 7 months ago

write a program that read a three side of a triangle and calculate the area of triangle using heron formula
√s(s-a)(s-b) (s-c)
where s=a+b+c
2

Answers

Answered by nevonj2am
3

Answer:

a=float(input("Enter the first side:")

b=float(input("Enter the second side:")

c=float(input("Enter the third side:")

s=(a+b+c)/2

ar=(s*(s-a)*(s-b)*(s-c))

area=ar*0.25

print("Area of the triangle is ",area)

Explanation:

I'm using float incase, if the entered value is decimal

0.25 is used to calculate square root of the no.

I hope this program will workout :)

Similar questions