窗体上有一个名为Commandl的命令按钮,并有如下程序:Private Sub Command_Click()Dim a As Integer,b As Integera=8b=12Print Fun(a,b);a;bEnd SubPrivate Function Fun(ByVal a As Integer,b As Integer)As Integera=a Mod 5b=b\5Fun=aEnd Function程序运行时,单击命令按钮,则输出结果是A.3 3 2B.3 8 2C.8 8 12D.3 8 1 2
窗体上有一个名为Commandl的命令按钮,并有如下程序:
Private Sub Command_Click()
Dim a As Integer,b As Integer
a=8
b=12
Print Fun(a,b);a;b
End Sub
Private Function Fun(ByVal a As Integer,b As Integer)As Integer
a=a Mod 5
b=b\5
Fun=a
End Function
程序运行时,单击命令按钮,则输出结果是
A.3 3 2
B.3 8 2
C.8 8 12
D.3 8 1 2
相关考题:
在窗体上有1个名称为Commandl的命令按钮,并有如下事件过程和函数过程:Private Sub Commandl Click()Dim P As Integerp=m(1)+m(2)+m(3)Print PEnd SubPrivate Function m(n As Integer)As IntegerStatic s As IntegerFor k=1 To ns=s+lNextm=sEnd Function运行程序,单击命令按钮Commandl后的输出结果为
在窗体上画一个命令按钮,名称为Commandl,然后编写如下事件过程: Private Sub Commandl_Click() Dim() a=Array(”机床”,”车床”,”钻床”,”轴承”)Printa(2)EndSub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.机床B.车床C.钻床D.轴承
窗体上有一个名为Commandl的命令按钮,并有如下程序:Private Sub Command 1_Click()Dim a As Integer, b As Integera=8b=12Print Fun(a, b);a; bEnd SubPrivate Function Fun(ByVal a As Integer, b As Integer)As Integera=a Mod 5b=b、5Fun=aEnd Function程序运行时,单击命令按钮,则输出结果是A)3 3 2B)3 8 2C)8 8 12D)3 8 12