试题 试卷
题型:单选题 题类:常考题 难易度:普通
浙江省高中信息技术 VB基本语句同步练习
Private Sub Command1_Click()
a=Val(Text1.text)
b=Val(Text2.text)
Do While a Mod b<>0
r=a Mod b
a=b
b=r
Loop
Text3.text=str(b)
End Sub
在Text1、Text2中分别输入30、6,则Text3中的值为( )
当输入a、b、c的值分别为5、2、8时,该算法的输出结果为( )
Private Sub Command1_click ( )
Dim n As Integer , m As Integer , k As Integer
n = Len ( Text1.Text )
m = Val ( Text2.Text )
k = Val ( Text3.Text )
If m + k -1 > n Then
Text4.Text = Mid ( Text1.Text , 1 , m – 1 )
Else
Text4.Text = Mid ( Text1.Text , 1 , m–1 ) + Mid ( Text1.Text , m+k , n–m–k +1 )
End If
试题篮