试题 试卷
题型:填空题 题类:常考题 难易度:普通
浙江省绍兴市诸暨中学2014-2015学年第高一下学期期中考试信息技术试题
X = 5:Y = Len(“2.345”)
If X > Y Then
Label1.Caption = “再见!”
Else
Label1.Caption = “你好!”
EndIf
该程序段运行后,在标签Label1上显示的是。
Private Sub Command1_Click()
Dim n As Integer, i As Integer, s As String
n = Val(Text1.Text)
s = ""
For i = 1 To 2 * n - 1
If i <= n Then ① Else ②
Next i
Label1.Caption = s
End Sub
为实现以上功能,划线①②处应分别填写( )
s=Text.Text
c=0
For i=1 To 26
⑴
Next
For i=1 To Len(s)
⑵
IF d(t)=0 Then d(t)=i
⑶
Text2 Text=Str(c)
填空处的代码可由以下部分组成
①d(i)=0 ②=val(Mid(si, 1) ③IFd(t)<>0Andi-d(t)> c Then c=i-d(t)
④d(i)=1 ⑤t=Asc(Mid(s, i, 1)-Asc("a")+1 ⑥fi-d(t)> c Then c=i-d(t)
代码顺序正确的是( )
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
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=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中的内容是( )
s = Text1.Text: sum = 0: t = 0: cnt = 1
For i = 1 To Len(s)
c = Mid(s, i, 1)
If c >= "0" And c <= "9" Then
j=j+1
If cnt Mod 2 = 1 Then sum = sum + val(mid(s,i-j,j))
j= 0:cnt = cnt + 1
End If
在文本框text1输入“12d6a3c4f20”,程序运行后sum的值是( )
执行这部分流程,输入11,变量i和f的值分别是( )
为了实现此算法,图中判断框①和处理框②处可填入的是( )
试题篮