试题 试卷
题型:多选题 题类: 难易度:容易
新疆伊犁哈萨克自治州霍城县2023-2024学年高一上学期信息技术10月月考试卷
Private Sub Command1_Click()
Dim s As Integer
Dim n As Integer
Dim i As Integer
n = Val(Text1.Text)
s = 1
For i = 2 To n
s = s * i
Next i
Label1.Caption = Str(n) + "!=" + Str(s)
End Sub
Private Sub Text1_Change()
Dim a, i As Integer
a= Val(Text1.Text)
For i = 2 To 6 Step 2
If a<= 15 Then a = a + i
Text1.Text = Str(a)
若在文本框Text1中输入2,执行该程序段,For语句的循环次数为( )
For i = 1 To 3
For j = 1 To 10
If j Mod i = 0 Then a(j) = 1 - a(j)
Next j
sum = 0
For i = 1 To 10
sum = sum + a(i)
已知数组a的所有元素初值均为0,运行上述程序段后,变量sum的值是( )
试题篮