试题 试卷
题型:单选题 题类:常考题 难易度:普通
云南省临沧市沧源县2020-2021学年高一上学期信息技术期末考试试卷
Dim n As Integer, s As Integer, i As Integer
n=Val(Text1.Text)
s=0
For i=1 To n Step 2
s=s+i
Next i
Text2.Text=Str(s)
图1
i=1
Do While i<=n
i=i+2
Loop
图2
当n的值为10时,关于该两段程序,下列说法不正确的是( )
s = 0
a = 5
For i = 1 To 10 Step 2
a = a + i
s = a * i
问:该程序段运行后,
For i=1 To 100
For j=i To 100
If j Mod i=0 Then a(j)=a(j)+1
Next j
Text1. Text=Str(a(30))
数组a各元素的初值为0,执行上述程序段后,文本框Text中输出的内容为( )
试题篮