import math a = float(input("Input a")) b = float(input("Input b")) x = float(input("Input x")) raduis = x * math.pi / 180 c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(raduis)) print("c = {:.2f}".format(c))
结果:
如果觉得答案对你有帮助,请点击下采纳,谢谢~