题解 | #计算三角形的周长和面积#
计算三角形的周长和面积
http://www.nowcoder.com/practice/109a44d649a142d483314e8a57e2c710
import math a, b, c = map(eval, input().split()) circumference = a + b + c S = circumference / 2 area = math.sqrt(S * (S - a) * (S - b) * (S - c)) print('circumference=%.2f area=%.2f' % (circumference, area))
查看25道真题和解析