题型:综合题 题类:常考题 难易度:困难
浙江省东阳高级中学2018-2019学年高二下学期信息技术开学考试试卷
Dim a(1 To 10) As Integer
Private Sub Form_Load()
’产生10个随机整数,并在列表框List1中显示,代码略
End Sub
Private Sub Command1_Click()
Dim k As Integer, summax As Integer, sum As Integer,i As Integer, j As Integer
k = 0 :summax = 0
sum = ①
For i = 1 To n - 1
If a(i) < a(i + 1) Then
sum = sum + a(i + 1)
k = k + 1
Else
If ② Then
summax = sum
③
sumb = i
End If
k = 0
sum = a(i + 1)
End If
Next i
For j = sumt To sumb
List2.AddItem Str(a(j))
Next j
List2.AddItem "和是:" & str(summax)
End Sub
① ② ③
试题篮