实现这个功能的VB代码如下:Private Sub Command1_Click() x = Val(InputBox("x=")) Print Format(x * x, "0.000"), Format(Sqr(x), "0.000")End Sub