[试题]

阅读下面程序

Private Function a (load As Integer)As Single

If loud<20 then

money=lnad/2

else

money=20+load

end if

a=money

E.nd Function

Private Sub Form_Click()

D.im load As Integer,fee As Single

Load=InputBox("请输入一个数:")

F.ee=a(loa@D@Print fee

E.nd Sub

运行后的输出结果是[ ]。

参考答案与解析:

相关试题

阅读下面的程序:Private Sub Command1_Click() For

[单选题]阅读下面的程序: Private Sub Command1_Click() For i=1 To 3 For j=1 To i For k=j To 3 x=x+1 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,窗体上输出的结果是A.3B.9C.14D.21

  • 查看答案
  • 以下程序段:Private Sub Form_Load( )Dim Nop As

    [单选题]以下程序段:Private Sub Form_Load( )D.im Nop As Integer, Op As String * 1Num1 = 3Num2 = 2Nop = val(Inputbox("请输入1-4之间的整数"))Select Case NopC.ase 1Op = "+"Result = Num1 + Num2C.ase 2Op = "-"Result = Num1 - Num2C.ase 3Op = "×"Result = Num1 * Num2C.ase

  • 查看答案
  • 有如下事件过程: Function UNC (ByVal x As Intege

    [单选题]有如下事件过程: Function UNC (ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 sic=x/y x=y y=sic Loop UNC=x End Function 以下是该函数的调用过程,该程序的运行结果是 PriVate Sub COmmand1_Click() Dim a As Integer Dim b As Integer a=12 b=2 x=UNC (a,B)Print x End SubA

  • 查看答案
  • 阅读下面的程序:Private Sub Form_Click() Dim m,n

    [单选题]阅读下面的程序: Private Sub Form_Click() Dim m,n As Integer m=InputBox("请输入M的值") m=Val(m) m1=m n=InputBox("请输入N的值") n=Val(n) n1=n Do While n<>0 remin=m Mod n m=n n=remin Loop Print m1,n1,m End Sub 程序运行后,单击窗体,在对话框中分别输入16和24,则程序在窗体上的输出结果为A.16 24 4B.16 24

  • 查看答案
  • 阅读程序: Function Fun(a As Integer) Static

    [单选题]阅读程序:F.unction Fun(a As Integer)Static cb=0:b=b+2:c=c+2F.=a*b*cE.nd FunctionPrivate Sub Command1_Click()D.im a As Integera=2F.or i=1 To 2Print Fun(a);NextE.nd Sub运行上面的程序,单击命令按钮,输出结果为A.8 16B.9 18C.10 20D.7 14

  • 查看答案
  • 设有Function过程:Private Function f(a As Int

    [单选题]设有Function过程:Private Function f(a As Integer, b As Integer) As Integera = a * a:b = b * bf = CInt(Sqr(a - b))E.nd Function则如下程序段的运行结果是( )。Private Sub Command1_Click()D.im X As Integer, Y As IntegerX = 5: Y = 4a = f(X, Y)Print aE.nd SubA. 5B. 4C. 3D.

  • 查看答案
  • 有如下函数过程。 Function Fun(By Val x As Intege

    [单选题]有如下函数过程。F.unction Fun(By Val x As Integer,By Val y As Integer)As IntegerD.o While y<>0reminder=x Mod yx=yy=reminderLoopF.un=xE.nd Function以下调用函数的事件过程,该程序的运行结果是Private Sub Command7_Click()D.im a As Integer,b As Integera=100:b=25x=Fun(a,B)Print x

  • 查看答案
  • 有如下函数过程。Function Fun( By Val x As Intege

    [单选题]有如下函数过程。 Function Fun( By Val x As Integer,By Val y As Integer) As Integer Do While y <> 0 reminder = x Mod y xmy y = reminder Loop Fun = x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub CommandT_Click( ) Dim a As Integer,b As Integer a = 100:b =25 x

  • 查看答案
  • (25)下列程序的运行结果是 。 Private Function myfun(

    [单选题](25)下列程序的运行结果是 。 Private Function myfun(m,n) Do While m>n Do While m>n:m=m-n:Loop Do While n>m:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9,8) End SubA.2 B.1 C.4 D.3

  • 查看答案
  • 阅读程序:Function Fun(a As Integer)Static c,

    [单选题]阅读程序:F.unction Fun(a As Integer)Static c,b=0:b=b+2:c=c+2F.=a*b*cE.nd FunctionPrivate Sub Command1_Click()D.im a As Integera=2F.or i=1 To 2Print Fun(A);NextE.nd Sub运行上面的程序,单击命令按钮,输出结果为A.8 16B.9 18C.10 20D.7 14

  • 查看答案
  • 阅读下面程序Private Function a (load As Intege