python 求三角形面积

import math a = float(input()) #获取输入边长a为浮点型 b = float(input()) #获取输入边长b为浮点型 c = float(input()) #获取输入边长c为浮点型 if(a+b>c and a+c>b and b+c>a): #判断是否能构成三角形 p = (a+b +c)/2 # 海伦公式 S = math.sqrt(p*(p-a)(p-b)(
相关文章
相关标签/搜索