试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省台州中学2018-2019学年高二上学期信息技术第二次统练试卷
x=25: y=20
If x>y Then
y =y+20
If y>50 Then y=y^2
Else
y=y^2
y=x+y
End If
Label1. Caption=Str(y)
该程序段执行后,标签Labell中显示的内容是( )
当输入a、b、c的值分别为5、2、8时,该算法的输出结果为( )
Private Sub Command1_Click()
Dim s As Integer, j As Integer
s = 0
For j = 1 To 10
If j Mod 2 <> 0 Then
s = s + j
Next j
Label1.Caption = Str(s)
End Sub
Dim n As Integer, i As Integer, s As String
n = Val(Text1.Text)
s = ""
For i = 1 To 2 * n - 1
If i <= n Then ① Else ②
Next i
Label1.Caption = s
为实现以上功能,划线①②处应分别填写( )
For i=1 to 10
b(i)=0
For i=1 To 5
For j=1 To 10
If b(i)<a(j)Then
b(i)=a(j)
t=j
a(t)=0
List1.AddI tem Str(b(i))
其中数组元素a(1)到a(10)的值依次为“25,42,53,66,77,83,98,14,38,99”,执行程序后,在列表框List1中依次输出的数据是( )
a(1) = 1
For i = 2 To 12
a(i) = a(i - 1) + Int(Rnd * 2) + 1
Key = Val(Text1.Text)
i = 1: j = 12: cnt = 1: flag = False
Do While i <= j And flag = False
cnt = cnt + 1
m = (i + j + 1) \ 2
If a(m) = Key Then
flag = True
ElseIf Key > a(m) Then
i = m + 1
j = m - 1
Loop
程序运行后,下列说法正确的是( )
试题篮