[单选题]

有如下程序。

Private Sub Command1_Click()

D.im a As Single

D.im b As Single

a=5: b=4

C.all Sub1(a, b)

E.nd Sub

Sub Sub1(x As Single, y As Single)

t=x

x=t / y

y=t Mod y

E.nd Sub

在调用运行上述程序后,a和b的值分别为

A.0 0

B.1 1

C.2 2

D.1 2

参考答案与解析:

相关试题

有如下程序:Private Sub Command1_Click()Dim a

[单选题]有如下程序: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1(a,b) End Sub Sub Sub1(x As Single,y As Single) t=X X=t/Y Y=t Mod y End Sub 在调用运行上述程序后,a和b的值分别为A.0 0B. 1 1C.2 2D.1 2

  • 查看答案
  • 有如下的程序。 Private Sub Command1_Click()Dim

    [单选题]有如下的程序。Private Sub Command1_Click()D.im k As Integer, m As IntegerD.im P As Integerk=4: m=1P=Fun(k, m) : Print P;P=Fun(k, m) : Print PE.nd SubPrivate Function Fun(a As Integer, b As Integer)Static m As Integer, i As Integerm=5: i=2i=i + m + 1m=i + a

  • 查看答案
  • 有如下程序。 Private Sub Command1_Click()Dim k

    [单选题]有如下程序。Private Sub Command1_Click()D.im k As Integer, m As IntegerD.im op As Integerk=4: m=1op=PPC(k, m) : Print op;op=PPC(k, m) : Print opE.nd SubPrivate Function PPC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i

  • 查看答案
  • 设有如下程序 Private Sub Command1_Click() Dim

    [单选题]设有如下程序 Private Sub Command1_Click() Dim sum As Double, x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum +x Next i End Sub 该程序通过For循环来计算一个表达式的值,这个表达式是______。A.1+1/2+2/3+3/4+4/5B.1+1/2+1/3+1/4+1/5C.1/2+2/3+3/4+4/5D.1/2+1/3+1/4+1/5

  • 查看答案
  • 设有如下程序:Private Sub Command1_Click() Dim

    [单选题]设有如下程序: Private Sub Command1_Click() Dim c As Integer,d As Integer c=4 d=InputBox("请输入一个整数") Do While d>0 If d>c Then c=c+1 End If d=InputBox("请输入一个整数") Loop Print c+d End Sub 程序运行后,单击命令按钮,如果在输入对话框中依次输入1、2、3、4、5、6、7、8、9和0,则输出结果是( )。A.12B.11C.10D.

  • 查看答案
  • 有如下程序:Private Sub Command1_Click()Dim k

    [单选题]有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 p=PPC(k,m):Print op; p=PPC(k.m):Print op End Sub Private Function PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=

  • 查看答案
  • 有如下程序:Private Sub Command1_Click()Dim k

    [单选题]有如下程序:Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 op:PPC(k,m):Print op; op:PPC(k,m):Print opEnd SubPrivate Function,PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=m

  • 查看答案
  • 设有如下程序:Private Sub Command1_Click( ) Dim

    [单选题]设有如下程序: Private Sub Command1_Click( ) Dim sum As Double,x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是A.1+1/2+2/3+3/4+4/5B.1+1/2+2/3+3/4C.1/2+2/3+3/4+4/5D.1+1/2+1/3+1/4+1/5

  • 查看答案
  • 设有如下程序:Private Sub Command1_Click() Dim

    [单选题]设有如下程序: Private Sub Command1_Click() Dim sum As Double,x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是 ______。A.1+1/2+2/3/4+4/5B.1+1/2+2/3+3/4C.1/2+2/3+3/4+4/5D.1+1/2+1/3+1/4+1/5

  • 查看答案
  • 设有如下程序:Private Sub Command1_Click() Dim

    [单选题]设有如下程序: Private Sub Command1_Click() Dim sum As Double, x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是______。A.1+1/2+2/3+3/4+4/5B.1+1/2+2/3+3/4C.1/2+2/3+3/4+4/5D.1+1/2+1/3+1/4+1/5

  • 查看答案
  • 有如下程序。 Private Sub Command1_Click()Dim a