当Visual Basic执行下面语句后,a的值为()。a = 1If a > 0 Then a = a + 1If a > 1 Then a = 0
查看答案
下列程序段的运行结果为()。Dim xx = Int(Rnd) + 5Select Case xCase 5Print "优秀"Case 4Print "良好"Case 3Print "及格"Case ElsePrint "不及格"End Select
A. 不及格
B. 良好
C. 及格
D. 优秀
下列程序的输入值为5,运行结果为()。Private Sub Command1_Click()Dim a As Integera = InputBox("请输入a的值")Select Case aCase 1 To 4Print "D"Case 5 To 10Print "C"Case 11 To 14Print "B"Case ElsePrint "A"End SelectEnd Sub
A
B
C. D
D. C
在窗体中添加一个命令按钮Command1,编写如下代码:Private Sub Command1_Click()x = 6If x > 6 ThenIf x = 6 ThenPrint "a"ElsePrint "b"End IfElseIf x < 8 ThenPrint "c"ElseIf x = 6 ThenPrint "d"End IfEnd IfEnd IfEnd Sub运行后,单击命令按钮,则在窗体上显示的是()。
A. a
B. c
C. d
D. b
下列程序段的执行结果是( )。Dim x As Integerx = 6Select Case xCase 5Print "优秀"Case 4Print "良好"Case 3Print "通过"Case ElsePrint "不通过"End Select
A. 通过
B. 优秀
C. 良好
D. 不通过