单项选择题
在窗体中添加一个名称为Command1的命令按钮,然后编写如下事件代码。
Private Sub Command1_Click()
A=75
If A>0 Then I=1
If A>70 Then I=2
If A>80 Then I=3
If A>90 Then I=4
MsgBox I
End Sub
窗体打开运行后,单击命令按钮,则消息框的输出结果是(
)。A) 1
B) 2
C) 3
D) 4
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
设有如下程序。 Private Sub Command1_Click() Dim sum As DOuble,x As Double sum=0 n=0 For i=1 To 5 x=n i n=n+1 sum=sum+x Next i End Sub 该程序通过:For循环来计算一个表达式的值,这个表达式是( )。
A) 1+1/2+2/3+3/4+4/5
B) 1+1/2+1/3+1/4+1/5
C) 1/2+2/3+3/4+4/5
D) 1/2+1/3+1/4+1/5
点击查看答案&解析
单项选择题
要想在过程Proc调用后返回形参X和y的变化结果,下列定义语句中正确的是( )。
A) Sub Proc(x as Integer,y as Integer)
B) Sub Proc(ByVal x as Integer,y as Integer)
C) Sub Proc(x as Integer,ByVal y as Integer)
D) Sub Proc(ByVal x as Integer,ByVal y as Integer)
点击查看答案&解析
相关试题
在窗体中添加一个名称为Command1的命令按...