[单选题]

单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End Function

A.21

B.23

C.19

D.35

参考答案与解析:

相关试题

单击一次窗体之后,下列程序代码的执行结果为______。Private Sub

[单选题]单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, z As Integer x = 1: y = 2: z = 3 Call fun1 (x, y, z) Print x; y; z Call fun2(x, y, z) Print x; y; z End Sub Private Sub fun1(x As Integer, y As Integer, z As I

  • 查看答案
  • 单击一次命令按钮之后,下列程序代码的执行结果为private Sub Comma

    [单选题]单击一次命令按钮之后,下列程序代码的执行结果为 private Sub Command1_Click() S=P(1) +P(1)+P(2)+P(3)+P(4) Print S: End Sub Public Function P(N As Integer) Static Sum For I=1 To n Sum=Sum+I Next 1 P=Sum End FunctionA.20B.35C.115D.135

  • 查看答案
  • 单击窗体时,下列程序代码的执行结果为______ 。 Private Sub T

    [单选题]单击窗体时,下列程序代码的执行结果为______ 。 Private Sub Test (x As Integer) x=x*2+1 If x < 6 Then Call Test(x) End If x-x*2+1 Print x; End Sub Private Sub Command1_ Click () Test 2 End SubA.23 47B.5 11C.10 22D.23 29

  • 查看答案
  • 单击一次命令按钮,下列程序代码的执行结果为()。Private Sub Comm

    [单选题]单击一次命令按钮,下列程序代码的执行结果为( )。 Private Sub Commandl_Click() Dima As Integer,b As Integer,CASInteger a=2:b=3:c=4 PrintP2(c,b,A) End Sub PrivateFunctionPl(X As Integer,y As Intege;z As Integer) P1=2*x+y+3*Z End Function PrivaA.21B.19C.17D.34

  • 查看答案
  • 单击命令按钮时,下列程序代码的执行结果为()。Private Sub Procl

    [单选题]单击命令按钮时,下列程序代码的执行结果为( )。 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 SubA.12 34B.2 34C.2 3D.12 3

  • 查看答案
  • 单击命令按钮时,下列程序代码的执行结果为 Private Sub Command

    [单选题]单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,18) End Sub Public Function MyFunc(m As Integer,n As Integer)As Integer Do While m ◇ n Do While m>n:m=m—n:Loop DO While m<n:n=n-m:Loop Loop My Func=m End FunctionA.2B.4C.6D.8

  • 查看答案
  • 单击窗口时,下列程序代码的执行结果为 Private Sub Form_Clic

    [单选题]单击窗口时,下列程序代码的执行结果为 Private Sub Form_Click( ) Text1 End Sub Private Sub Text(x As Integer) x=x*3+1 if x<6 Then call Text(x) End if x=x*2+1 Print x; End SubA.27 55B.11 35C.22 45D.24 51

  • 查看答案
  • 单击一次命令按钮之后,窗体中的输出结果为______。Private Sub C

    [单选题]单击一次命令按钮之后,窗体中的输出结果为______。 Private Sub Command1_ Click() For i = 1 To 4 x = fun(i) Print x; Next i End Sub Function (n) x = n * n FF = x End SubA.1 4 9 16B.1 3 5 7C.3 6 9 12D.2 4 6 8

  • 查看答案
  • 单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public S

    [单选题]单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i +

  • 查看答案
  • 单击命令按钮时,下列程序代码的执行结果为()。Private Function

    [单选题]单击命令按钮时,下列程序代码的执行结果为( )。 Private Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Funcfion Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Funcfion Private Sub Command1_Click

  • 查看答案
  • 单击一次窗体之后,下列程序代码的执行结果为______。Private Sub