单项选择题

在窗体中添加一个命令按钮Command1,并编写如下程序:Private Sub Command1_Click()Dim x As Integerx=Val(InputBox("请输入一个数"))If x^2=9Then y=xIf x^2<9Then y=1/xIf x^2>9Then y=x^2+1Print yEnd Sub程序运行后,在InputBox中输入3,单击命令按钮,程序的运行结果是()。

A.3
B.0.33
C.17
D.0.25