试题 试卷
题型:单选题 题类:模拟题 难易度:普通
浙江省杭州市2016年信息技术高考模拟卷十
S=256
For i=1 to step 3
S=S/4
Next i
程序执行后,s的值为1,则循环语句中循环变量的终值应为( )
For k = 1 To 4 Step 3
For i = k To k + 1
For j = i + 1 To k + 2
If a(j) < a(i) Then
temp = a(j): a(j) = a(i): a(i) = temp
End If
Next j
Next k
数组元素a(1)到a(6)的值依次为“9,8,7,6,5,4”,经过该程序段“加工”后,数组元素a(1)到a(6)的值依次为( )
s=1
For i=20 To________ Step-2
s=s+i
若要使语句s=s+i执行5次,则循环变量i终值应为( )
Private Sub Command1_Click()
Dim sum As Double, x As Double
sum = 0
n = 0
For i = 1 To 5
x = n / i
n = n + 1
sum = sum + x
Next
End Sub
该程序通过For循环计算sum的值,下列表达式的值与sum相等的是( )
Private Sub Command 1_Click()
Dim i As Integer
Dim t As Integer
Dim s As String
i = 1:t = 1:n = Text1.Text
List1.Clear
Do While t< = n
s = s + “*”
If i = t Then
List1.AddItem s
t = t + 1
i=0
i = i + 1
Loop
试题篮