import math a = float(input("長辺の長さ?")) b = float(input("短辺の長さ?")) diag = math.sqrt(a**2 + b**2) print(f"対角線の長さは{diag}です。") # プログラム5-7(対角線の長さ)