试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省台州中学2018届高三上学期信息技术第四次统练试卷
Max=-10000
For i = 1 To 10
s = 0
For j = i To 10
s = s + a(j)
If s > max Then max = s
Next j
Next i
已知数组a(1)到a(10)的原始数据为6,-6,8,-7,7,2,-2,-1,-2,4.程序执行后,变量max的值为( )
s=Text1.Text
List1.Clear
Len1=Len(s) ‘①
For i=l To len1 ‘②
For j=1 To len1-i ‘③
List1.Addltem Mid(S,j,i) ‘④
运行时发现未输出所有子串,则修改( )
s = Text1.Text
List1.Clear
len1 = Len(s) ‘①
For i = 1 To len1 ‘②
For j = 1 To len1- i ‘③
List1.AddItem Mid(s, j, i) ‘④
Private Sub Command1_Click()
Dim s As String, s1 As String, c As String
For i = 1 To Len(s)
c = Mid(s, i, 1)
s1 = ⑴
For j = ⑵
If c <> Mid(s, j, 1) Then
s1 = s1 + Mid(s, j, 1)
End If
⑶
Text2.Text = s
End Sub
s = "abcababcababcab": L = Len(s)
For t = 1 To L \ 2 '枚举可能的原始长度
If L Mod t = 0 Then
For i = t + 1 To L Step t
If ① <> Mid(s, 1, t) Then Exit For
If i = L + 1 Then ans = ② : Exit For
Next t
Text1.Text = ans
上述程序段划线处①②语句依次可为( )
试题篮