单击命令按钮时,下列程序代码的运行结果为 Private Sub Command1_Click() print MyFunc(20,18) End Sub Public Function MyFunc (m As Integer,n As Integer)As Integer Do While m <>n Do While m > n:m=m - n:Loop Do While m < n:n=n - m:Loop Loop MyFunc=m End FunCtion
A.0
B.2
C.4
D.6
第1题:
单击命令按钮时,下列程序代码的执行结果为 Public Sub Procl(n As Integer,ByVal m As integer) n=n Mod 10 m=m\10 End sub Private Sub Commandl_Click() Dim x AS Integer,y AS Integer x=12:y=24 Call Procl(x,y) Print x;y End sub
A.12 24
B.2 24
C.2 3
D.12 2
第2题:
若看到程序中确以下事件过程,则可以肯定的是,当程序运行时( )。 Private Sub Click—MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print"VB Program" End Sub
A.用鼠标左键单击名称为“Command1”的命令按钮时,执行此过程
B.用鼠标左键单击名称为“MouseDown”的命令按钮时,执行此过程
C.用鼠标右键单击名称为“MouseDown”的命令按钮时,执行此过程
D.用鼠标左键或右键单击名称为“Click”的命令按钮时,执行此过程
第3题:
单击命令按钮时,下列程序代码的运行结果为()。 Public Sub Procl(ByVal n As Integer, m As Integer) n = n Mod 10 m = m 10 End Sub Private Sub Command1_Click() Dim x As Integer, y As Integer x = 23 y = 65 Call Procl(x, y) Print x; y End Sub
A.3 65
B.23 6
C.3 60
D.0 65
第4题:
单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(m As Integer,n As Integer) As Integer Do While m<>n Do While m>n m=m-n Loop Do While m<n n=n -m Loop Loop MyFunc=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End Sub
A. 2
B.4
C.6
D.8
第5题:
单击命令按钮时,下列程序代码的执行结果为______。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m/10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12:y=34 Call Procl(x,y) Print x;y End Sub
A.12 34
B.2 34
C.2 3
D.12 3