• 2021-04-14
    下面过程运行后显示的结果是()。Private Sub f1(ByVal n%, m%)n = n Mod 10m = m 10End SubPrivate Sub Command1_Click()Dim x%, y%x = 12: y = 34Call f1(x, y)Print x, yEnd Sub
  • 12 3

    内容

    • 0

      设有如下两个过程: Private Sub Form_Click() Dim x!,y! x = 18: y = 10 Call PPP((x), y) Print x,y End Sub Private Sub PPP(a As Single, b As Single) a = a + b Print a,b b = a + b Print a,b End Sub 运行程序后, 则输出结果是________

    • 1

      下面程序运行后,点击窗体,变量 x和y的值分别为( )、( ) Private Sub Form_Click() Dim x, y As Integer x = 5: y = 10 nc x, y Print "x="; x; "y="; y End Sub Private Sub nc(ByVal a%, b%) a = a + b b = a a = a * b End Sub

    • 2

      在窗体上添加一个命令按钮,程序运行时单击Commandl后,窗体上的输出结果为。 Private Sub fun(a%, ByVal b%) a=a*2:b=b*2 End Sub Private Sub Command1_Click() Dim x%,y% x=10:y=20 Call fun(x, y) Print x; y End Sub

    • 3

      声明一个变量为局部变量应该用( )。 A: Private Sub Command1 Click() n=5:x=1 Do X=X * I I=I + 1 Loop While I < n Print x End Sub B: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub C: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub D: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I>n Print X End Sub

    • 4

      单击命令按钮时,下列程序代码的执行结果为( )。 Private Sub Procl(nAs Integer,ByValmASInteger) n=nMod 10 m=m\10 End Sub PrivateSubCommandl_Click() Dimx As Integer Dimy As Integer x=12 y=34 CallProcl(x,y) Printx;y End Sub A: 12 34 B: 2 34 C: 2 3 D: 12 3