题型:综合题 题类:模拟题 难易度:困难
浙江省温州市2016年3月普通高中学业水平信息技术模拟考试试卷
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
①应选;②应选
空格③处应填写的代码为:。
试题篮