题型:综合题 题类:常考题 难易度:困难
浙江省杭州市第二中学2015-2016学年高二下学期信息技术期中考试试卷
Private Sub Command1_Click()
Dim a(1 To 10) As Integer
Dim s As Integer
Dim max As Integer
n = Val(Text1.Text)
i = 1
Do While i <= n
a(i) = Int(Rnd * 100)
List1.AddItem Str(a(i))
s = s + a(i)
①
Loop
max = a(1)
For i = 2 To n
If a(i) > max Then ②
Next i
List1.AddItem "和为:" + ③
List1.AddItem "最大值为:" + Str(max)
End Sub
供①②选填:
a.n=n+1 b. i=i+1 c.max=a(i) d. a(i)=max
空格③处应填写的代码为:。
试题篮