试题 试卷
题型:单选题 题类:常考题 难易度:容易
浙江省嘉兴市第一中学2015-2016学年高二上学期信息技术期中考试试卷
Dim a(3, 3) As Integer
For m = 1 To 3
For n = 1 To 3
a(m, n)=(m-1)*3+n
Next n
Next m
For m = 2 To 3
For n = 1 To 2
Print a(n, m);
运行后输出结果是( )
c = 1: s = 10
Do While c <= s
For i = s To c + 1 Step -1 If Then
t = a(i - 1): a(i - 1) = a(i): a(i) = t End If
Next i For i=
If Then
t = a(i + 1): a(i + 1) = a(i): a(i) = t End If
Next i
c = c + 1 s = s - 1
Loop
上述程序段三个方框处的语句分别为( )
Dim a(1 To 10) As Integer
a(1)=2: a(2)=18: a(3)=10: a(4)=34: a(5)=16
a(6)=7: a(7)=37: a(8)=6: a(9)=15: a(10)=15
c=0: x=0: t= 1
For i=1 To 10
a(i)=a(i)*t
c=c+a(i)
If c>0 Then x=x+1
t=-t
Text1.Text=Str(x)
则程序运行后Text1中显示( )
试题篮