试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省温州市新力量联盟2018-2019学年高二下学期信息技术期末联考试卷
k=0:s=0
for i=2 to n
If a(i)>a(i-1) then
_______①_________
Else
k=0
End If
if _____②______ then s=s+1
next i
text1.text=str(s)
划线处的正确语句是( )
Private Sub Command1_Click()
Dim a As intger, i As intger, s As String
n = Val(Text1.Text)
s = ""
For i = 1 To 2 * n - 1
If i > n Then ① Else ②
Next i
text2.Text = s
End Sub
为实现以上功能,①②处分别填写( )
i =1:j=2
Do While j <= 10
If j < 10 Then
If a(j) > a(j + 1) Then j = j + 1
If a (i) > a(j) Then
temp =a (i): a(i) = a(j): a(j) = temp
i=j
j=2*i
Exit Do
Loop
Text1.Text =a (2)
已知数组元素a(1)到a(10)的原始数据为“20, 3, 10, 17,18, 15, 16, 19, 21, 30”,执行该代码后,文本框Text1中显示内容是:( )
Dim a (1 To 6) As Integer
Randomize
a(1) = Int (Rnd*2) + 1
For i = 2 To 6
a(j) = Int (Rnd*i) *2 + 1
If a(i) < a(i-1) Then
a(i) = a(i) + a(i-1)
执行该程序段后,数组元素a(1)到a(6)的值可能是( )
试题篮