试题 试卷
题型:单选题 题类:常考题 难易度:困难
浙江省台州中学2014-2015学年高一下学期信息技术期中考试试卷
m=a(1)
For i=2 to 100
If a(i) > m then m=a(i)
Next i
该程序段执行后,变量m中存储的是( )
For i= 1 To 6
a(i)=i+1
该程序段运行后数组元素a(3)的值是:( )
Dim x As Integer,y As Integer
x=Val(Text1.Text)
If x>200 Then
y=5*x
ElseIf x>=50 Then
y=10*x
Else
y=4*x
End If
Text2.Text=Str(y)
若要测试所有分支程序代码是否正确,以下测试数据中,最恰当的一组是( )
Dim a(1 To 5) As Integer
For i = 1 To 5
a(i) = Int(Rnd * 30 + 10)
t = t + a(i) \ 10
For j = 1 To t \ 3
If j Mod 2 = 1 Then a(j) = a(j) + 1 Else a(j) = a(j) - 1
Next j
运行程序后,数组a各个元素的值,不可能的是( )
i = n
Do While i >=2
k = i
For j = To 1 Step -1
If a(j) > a(k) Then k = j
If i <> k Then
t = a(k): a(k) = a(i): a(i) = t
Loop
则下列说法正确的是( )
试题篮