更新时间2019-08-11 05:03:37
程序参考
Private Function fun(r As Double, ByRef s As Double)
fun = (4# / 3#) * 3.14 * r ^ 3
s = 4# * 3.14 * r ^ 2
End Function
Private Sub Command1_Click()
Dim r As Double, s As Double, v As Double
r = InputBox("输入半径")
v = fun(r, s)
Print "s=", s
Print "v=", v
End Sub