试题 试卷
题型:单选题 题类:常考题 难易度:容易
安徽省芜湖市无为华星学校2020-2021学年高一下学期信息技术期中考试试卷
Dim a(1 To 5) As Integer Randomize
s = 0
Do While s<5
t = Int(Rnd * 5 + 1) a(t) = a(t) + 1
If a(t) = 1 Then s = s + a(t)
Loop
已知数组a(1)到 a(5)的初值均为0,该段程序运行后,下列说法正确的是( )
For i= 1 To 10
b(i)=0
Next i
For i= 1 To 5
For j= 1 To 10
If b(i) <a(j) Then
b(i)=a(j)
t=j
End If
Next j
a(t)=0
List 1.Additem Str(b(i) )
其中数组元素a(1)到a(10)的值依次为“25,42,53,66,77,83,98,14,38,99”,执行程序后,在列表框List 1中依次输出的数据是( )
s="VictoryOnTheWay" #'A'的ASCII值为65,"a"的ASCII码值为97
mx=""
pre=0
for i in range(1,len(s)):
if ord(s[i]) < 97:
if mx<s[pre:i]:
mx=s[pre:i]
pre=i
print(mx)( )
试题篮