以下是代码:
import math
x=int(input())
y=int(input())
z=int(input())
p=(x+y+z)/2
if((x+y)>z and (x-y)<z):
s=math.sqrt(p*((p-x)*(p-y)*(p-z)))
print("%.2f"%s)
else:
print("数据错误")
以下是代码:
import math
x=int(input())
y=int(input())
z=int(input())
p=(x+y+z)/2
if((x+y)>z and (x-y)<z):
s=math.sqrt(p*((p-x)*(p-y)*(p-z)))
print("%.2f"%s)
else:
print("数据错误")