题型:综合题 题类:常考题 难易度:普通
信息技术基础
图a
图b
程序运行界面如图b所示,请回答以下问题。
Private Sub Command1_Click()
Dim a(1 To 4) As Integer, b(1 To 4) As Integer
'数组a存储骰子的点数,数组b存储对应的二进制数值
Dim s As Integer
Randomize
List1.Clear
c=0
For i=1 To 4
a=Int(Rnd*6)+1
Ifthen b=1 Else b=0
c=c+
List1.AddItem ″第″+Str(i)+″次:″+Str(a)+″点″
Next i
Text1.Text=Str(c)
End Sub
试题篮