题目内容

在窗体上画一个名称为Comman1的命令按钮,并编写如下程序:Private Sub Command1_Click()Dim x As IntegerStatic y As Integerx = 25y = 10Call f1(x, y)Print x, yEnd SubPrivate Sub f1(x1 As Integer, y1 As Integer)x1 = x1 + 2y1 = y1 + 2End Sub程序运行后,单击命令按钮,在窗体上显示内容是___________。

查看答案
更多问题

运行下面的程序,单击窗体后,从键盘上输入字符串"6",窗体上显示的输出结果为________。Private Sub Form_Click()Dim n As IntegerDim s1 As Strings1 = InputBox("输入一个字符串")n = Val(s1)Print Fact(n)End SubPrivate Function Fact(m As Integer) As LongDim s As LongIf m = 1 Thens = 1Elses = Fact(m - 1) * mEnd IfFact = sEnd Function

执行下面的程序,第二行输出结果是___________。Option ExplicitPrivate Sub Form_Click()Dim I As Integer, J As IntegerI = 2: J = 3Call Test(I, J)Print I, JCall Test(I, J)Print I, JEnd SubPrivate Sub Test(M As Integer, N As Integer)Static Sta As IntegerM = M + NN = N + M + StaSta = Sta + MEnd Sub

执行下面的程序,输出结果是___________。Option ExplicitPrivate Sub Form_Click()Dim M As Integer,N As IntegerM=2:N=3Print M+N+F(M,N);M=1:N=2Print F(M,N)+F(M,N)End SubPrivate Function F(X As Integer,Y As Integer)X=X+YY=X+3F=X+YEnd Function

执行下面的程序,输出结果是___________。Private Sub Command1_Click()Dim a As Integer, b As Integer, c As Integera = 3b = 4c = 5Print f2(c, b,a)End SubPrivate Function f1(x As Integer, y As Integer, z As Integer)f1 = 2 * x + y + 3 * zPrint f1;End FunctionPrivate Function f2(x As Integer, y As Integer, z As Integer)f2 = f1(z, x, y) + xPrint f2;End Function

答案查题题库