试题 试卷
题型:填空题 题类:常考题 难易度:普通
浙江省台州中学2014-2015学年高一下学期信息技术期中考试试卷
请将实现以上功能的程序补充完整:
Private Sub Command1_Click( )
x= Val (Text1.text)
If x>0 Then
ElseIf Then
y = 0
ElseIf x < 0 Then
y = Abs(x)
End If
End Sub
右框内划线处的内容可以是( )
s = 0:x = 1
Do While x <= 5 s = s + x
x = x + 2 Loop
该程序段运行后,语句“x <= 5”执行的次数是( )
Dim a(1 To 100)As Integer, b(1 To 10) As Intege
Dim i As Integer, s As Integer, c As Integer
For i=1 To 100
a(i)=0
Next i
For i=1 To 9 Step 2
a(b(i))=a(b(i))+1: a(b(i+1)+1)=a(b(i+1)+1)-1
c=0
c=c+a(i)
If c=0 Then s=s+ 1
Text1. Text= Str(s)
若数组b中的值依次为“5,10,7,20,30,40,40,60,55,70”,则程序运行后Text中的内容是( )
For i=1 To 8
d(i)= In(Rnd*10)
For i= 2 To 8
If i Mod 2=0 And d(i)> d(i-1)Then
d(i)=d(i-1)+1
ElseIf i Mod 2= 1 Then
If d(i)>d(i-2) Then
t=d(i): d(i)=d(i-2): d(i-2)=t
Next i( )
m=1
for i in range(10):
m=m*i
print(m)
a=a-b
a=a*b
试题篮