这就是我所拥有的。我需要打印表面积
def compute_surface_area_cylindar(radius, height):
surface_area = 2 * math.pi * r * h + 2 * math.pi * math.pow(r, 2)
return surface_area
radius = input("Radius of circle:")
radius = int(radius)
r = radius
height = input("Height of the cylinder:")
height = int(height)
h = height
以下是您的操作方法:
以上代码将根据半径和高度输出圆柱体的表面积,假设上面的公式是正确的。在
相关问题 更多 >
编程相关推荐