试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙教版高一信息技术 专题五:VB程序设计
x=-4.2
y=Abs(Int(x))
If x>0 And x<5 Then
y=y+1
Else
y=y-1
End If
该程序段运行后,y的值为( )
Private Sub Command1_Click()
Dim i As Integer, c As Integer, n As Integer
n = Val(Text1.Text)
c = 0
For i = 1 To n
If i Mod 3 = 0 Then c = c + 1
Next i
Label1.Caption = Str(c)
End Sub
运行该程序,在文本框Text1中输入20,单击命令按钮Command1,在标签Label1中显示的是{#blank#}1{#/blank#}。
n=Len(Text1.Text):c=1
For i=1 To n
s=Mid(Text1.Text,i,1)
If s>=“0”And s<=“9”Then
a(c)=a(c)*10+Val(s)
If a(c)>0 Then c=c+1
在文本框Text1中输人“No1:X:123:Y:680:End”。执行该程序段后,数组a(2)的值为( )
试题篮