试题 试卷
题型:单选题 题类:常考题 难易度:容易
浙教版高一信息技术 专题五:VB程序设计
n = Val(Text1.Text)
k = a(1)
For i = 2 To n
If a(i) < k Then k = a(i)
Next i
Text2.Text = Str(k)
假设在文本框Text1中输入“8”,则文本框Text2中输出的值是( )
Private Sub Command1_Click()
Dim n As Integer,cj As Integer,s As String
n=Val(Text1.Text)
cj={#blank#}1{#/blank#}
s=”s=”
Do While {#blank#}2{#/blank#}
If n<>4 Then
n=n-3
cj=cj*3
s=s+”3×”
Else
n=n-2
cj=cj*2
s=s+”2×”
End If
Loop
cj={#blank#}3{#/blank#}
If n=3 Then s=s+”3” Else s=s+”2”
Text2.Text=s
Text3.Text=cj
End Sub
试题篮