程序设计,vb 求高手解答。谢谢了

2024-11-30 16:54:25
推荐回答(1个)
回答1:

Private Sub Command1_Click()
Dim x As Single
x = Val(InputBox("输入一个正实数"))
MsgBox Round(x, 3) & vbCrLf & "平方=" & Round(x * x, 3) & vbCrLf & "平方根=" & Round(Sqr(x), 3)
End Sub