网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x = 20 y = 2 f = x * y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Static x As Integer x = 10 y = 5 y = f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是
A.10 5
B.20 5
C.20 40
D.10 40
参考答案
更多 “ 设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x = 20 y = 2 f = x * y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Static x As Integer x = 10 y = 5 y = f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是A.10 5B.20 5C.20 40D.10 40 ” 相关考题
考题
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x; y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是______。A.10 5B.20 5C.20 40D.10 40
考题
窗体中有命令按钮Commandl,事件过程如下:PublicFunction f(x As Integer)As IntegerDim Y AsIntegerX=20y=2f= X *YEnd FunctionPrivateSub Commandl_Click( )Dim y As Integerstatic x As Integerx=10y=5y=f(x)Debug.Print x;yEnd Sub运行程序,单击命令按钮,则立即窗口中显示的内容是( )A.10;5B.10;40C.20;5D.20;40
考题
窗体中有命令按钮Command1,事件过程如下:Public Function f(x As Integer)As IntegerDim y As Integerx=20y=2f=x*YEnd FunctionPrivate Sub Command 1_Click()Dim y As Integerstatic x As Integerx=10y=5y=f(x)Debug.Print x;yEnd Sub运行程序,单击命令按钮,则立即窗口中显示的内容是( )。A.10 5B.10 40C.20 5D.20 40
考题
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程; Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.10 5B.20 5C.20 40D.10 40
考题
设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Static x As Integer x=10 y=5 y=f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是A.10 5B.20 5C.20 40D.10 40
考题
设有Function过程:Private Function f(a As Integer, b As Integer) As Integera = a * a:b = b * bf = CInt(Sqr(a - b))End Function则如下程序段的运行结果是( )。Private Sub Command1_Click()Dim X As Integer, Y As IntegerX = 5: Y = 4a = f(X, Y)Print aEnd SubA. 5B. 4C. 3D. 9
考题
11、下面哪些定义是类型正确的?A.f :: (Integer, Integer) - Float f (x,y) = x / yB.f :: (Integer, Integer) - Float f (x,y) = (fromInteger x) / (fromInteger y)C.f :: (Integer, Integer) - Float f (x,y) = 3*x + yD.f :: (Integer, Integer) - Integer f (x, y) = 3*x + y
热门标签
最新试卷