Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

MY PROGRAMMES

Sunday, April 2, 2023

AREA OF A TRIANGLE USING HERON'S FORMULA

a=int(input("Enter the value of first side = "))
b=int(input("Enter the value of second side = "))
c=int(input("Enter the value of third side = "))
S=(a+b+c)/2
A=(S*(S-a)*(S-b)*(S-c))**(1/2)
print('        A  ')
print('        /\ ')
print('       /  \ ')
print('      /    \ ')
print('     /      \ ')
print('    /        \ ')
print('   /          \ ')
print('  /            \ ')
print(' /________\ ')
print('B','            C',"\n")
print("Semi perimeter of triangle = ",S)
print("Area of triangle = ",A)

OUTPUT