計算三角形面積公式:p=p=(a+b+c)/2
area*2=p*(p-a)*(p-b)*(p-c)
#計算三角形的面積
a=float(input('輸入第一條邊的長度:'))
b=float(input('輸入第二條邊的長度:'))
c=float(input('輸入第三條邊的長度:'))
if a+b>c and a+c>b and b+c>a:
p=(a+b+c)/2
s=(p*(p-a)*(p-b)*(p-c))**0.5
print('三角形面積為:',s)
else:
print('三角形不成立')
