在窗体中添加一个命令按钮(名称为Command1) ,然后编写如下代码: Private Sub Command1_Click( ) A=95 If A>60 Then I=1 If A>70 Then I=2

admin2010-07-10  16

问题 在窗体中添加一个命令按钮(名称为Command1) ,然后编写如下代码:    Private Sub Command1_Click( )      A=95    If  A>60  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

答案D

解析  if语句为if条件表达式1 Then语句1,当条件表达式1为真时要执行语句1。在程序中,A=95,A>90为真,因此执行语句“I=4”,输出结果为4。
转载请注明原文地址:https://kaotiyun.com/show/rbup777K
0

最新回复(0)