试题 试卷
题型:填空题 题类:常考题 难易度:普通
常量、变量、函数和表达式练习题(填空题部分)
a(1) = 2
For i = 2 To 3
a(i) = a(i - 1) - Int(Rnd() * 2)
If i Mod 2 = 1 Then
a(i) = a(i) + 1
Else
a(i) = a(i) - 1
End If
Next i
执行程序后,a(2)和a(3)的值不可能的是( )
Private Sub Command1_Click()
Dim a(1 To 5) As Integer
a(5)=Val(Text1.text)
For i=4 To 1 Step -1
a(i)=a(i+1)\2
Label1.caption=str(a(1))
End sub
在文本框Text1中输入“100”,单击命令按钮Command1后,标签Label1中显示的内容是( )
实现上述功能的VB程序如下,请回答下列问题:
试题篮