试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省台州中学2018-2019学年高二上学期信息技术第二次统练试卷
Private sub Command1_Click()
Dim a As Single
Dim py As String
a= Val (Text1) (1)
If a>0 Then py =”正数”
If a=0 Then py=”零”
If a<0 Then py=”负数”
Label3.Caption=a(2)
End Sub
Dim a As Integer, b As Integer
a = Val(Text1.Text)
If a Mod 2 = 0 Then
b = a + 1
ElseIf a Mod 3 = 0 Then
b = a + 2
ElseIf a Mod 5 = 0 Then
b = a + 4
Else
b = a
End If
Label1.Caption = Str(b)
运行该程序,在文本框Text1中输入25,单击命令按钮Command1,在标签Label1中显示的是( )
Dim a(1 To 1 000)As String
Dim b(1 To 2)As Integer
N=Len(Text1.Text)
For i=1 To n
a(i)=Mid(Text1.Text,i,1)
Next i
DO While n>l
If ASC(a(n))>=Asc(a(n-1))Then
m=1
m=2
b(m)=b(m)+1
n=n-1
Loop
数组b各元素的初始值都为0,文本框Text1的内容为“2018Python”。执行程序后,变量b(1)的值为( )
Dim n As Integer, i As Integer, a As Integer, b As Integer
Randomize
n=5:i=1
Do While i <=n
a= Int(Rnd*90)+ 10
b= Int(Rnd*90)+ 10
If a>b Then
List1.AddItem Str(a)+"-"+ Str(b)+“=“
i=i+1
执行该程序段后,下列说法正确的是( )
试题篮