执行下面程序,第一行输出结果是 ,第二行输出结果是
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
  A=2
  Call Subl(A)
  End Sub
Private Subl(x As Integer)
  x=x*2+1
  If x<10 Then
    Call Subl(x)
  End If
  x=x*2+1
  Print x
End Sub

程序执行结果s的值是 【7】
Private Sub subl(Byval p As Integer)
p=p*2
End Sub
Private Sub Commandl_Click( )
Dim i As Integer
i=3
Call subl(i)
ifi>4 then i=i mod 2
Print cstr(i)
End Sub

执行下面程序,第一行输出结果是 (11) ,第二行输出结果是 (12)
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
  A=2
  Call Subl(A)
  End Sub
Private Subl(x As Integer)
  x=x*2+1
  If x<10 Then
    Call Subl(x)
  End If
  x=x*2+1
  Print x
End Sub

在窗体中添加一个命令按钮,编写如下程序:
Private Sub Subl(p,m,n)
  p=p+1:m=m+1:n=n+1
  Print"subl:";p;m;n
End Sub
Private Sub Command1_Click( )
  al=1:b=2:c1=3
  Call Subl(a,b1+3,c1)
  Print"Main:";a1;b1;c1
End Sub
程序运行后,输出结果为

A:
Sub:2 6 4
Main:2 6 4
B:
Sub:2 6 4
Main:2 6 4
C:
Sub:2 6 4
Main:1 2 3
D:
Sub:2 6 4
Main:2 2 3

在窗体中添加一个命令按钮,编写如下程序: Private Sub Subl(p,m,n)   p=p+1:m=m+1:n=n+1   Print"subl:";p;m;n End Sub Private Sub Command1_Click( )   al=1:b=2:c1=3   Call Subl(a,b1+3,c1)   Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为

A:Sub:2 6 4 Main:2 6 4 B:Sub:2 6 4 Main:2 6 4 C:Sub:2 6 4 Main:1 2 3 D:Sub:2 6 4 Main:2 2 3

程序执行结果s的值是 【7】 。 Private Sub subl(Byval p As Integer) p=p*2 End Sub Private Sub Commandl_Click( ) Dim i As Integer i=3 Call subl(i) ifi>4 then i=i mod 2 Print cstr(i) End Sub

有一过程如下: Sub Subl (m As Integer,total As Long) Dim i AS Integer total = 1 For i = 1 To m total = total * i Next End Sub 调用它的事件过程如下: Private Sub Commandl_Click( ) Dim tot As Long, a As Integer a = Val( InputBox ("请输入数据") Call Subl (a,tot) Print tot End Sub 则输入数据5,运行结果为 【10】

执行下面程序,第一行输出结果是 (11) ,第二行输出结果是 (12)
Option Explicit
Private Sub Form_Click( )
Dim A As Integer
  A=2
  Call Subl(A)
  End Sub
Private Subl(x As Integer)
  x=x*2+1
  If x<10 Then
    Call Subl(x)
  End If
  x=x*2+1
  Print x
End Sub

微信扫码获取答案解析
下载APP查看答案解析