中国大学MOOC: 设有如下程序代码:Private Function Fc(ByVal n As Integer) As Integer Fc = n * Fj(5)End FunctionPrivate Function Fj(ByVal n As Integer) As Integer Fj = n + 3End FunctionPrivate Sub Command1_Click() Dim a As Integer a = 3 Form1.Print Fc(a)End Sub程序时单击命令按钮,在窗体上输出的结果为( )。
举一反三
- 中国大学MOOC: 设有如下程序代码:Private Function Fc(ByVal n As Integer) As Integer Fc = n * Fj(5)End FunctionPrivate Function Fj(ByVal n As Integer) As Integer Fj = n + 3End FunctionPrivate Sub Command1_Click() Dim a As Integer a = 3 Form1.Print Fc(a)End Sub程序时单击命令按钮,在窗体上输出的结果为( )。
- 设有如下函数定义:Function fun() As Integer Static a% fun = 3 * a + 1 a = a + 2End FunctionPrivate Sub Command1_Click() Dim n As Integer n = fun n = fun MsgBox (n)End Sub则在Command1_Click中 MsgBox 显示的结果是____________。
- 编写如下程序: Private Sub Command1_Click() Dim n As Integer : Static s As Integer For n = 1 To 3 s = s + n Next Print s End Sub 程序运行后,第三次单击命令按钮Command1时,输出结果为
- 如下程序的运行结果是【1】. Private Sub Command1_Click() Dim x As Integer x = 12 f2 x Print x End Sub Public Sub f2(n As Integer) n = n Mod 10 End Sub
- 设有下面程序: Function F( a As Integer) b = 0 Static c b= b + 1 c= c + 2 F= a + b + c End Function Private Sub Command1_Click() Dim a As Integer a = 2 For i = 1 to 3 Print F(a); Next i End Sub 运行上面的程序,单击命令按钮 Command1 ,输出结果为________