网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:

Private Sub Command1_Click()

Static x as integer

X=f(x+5)

Cls

Print x

End Sub

Private function f(x as integer)as integer

F=x+x

End function

连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是

A)10

B)30

C)60

D)70


参考答案

更多 “ 设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:Private Sub Command1_Click()Static x as integerX=f(x+5)ClsPrint xEnd SubPrivate function f(x as integer)as integerF=x+xEnd function连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是A)10B)30C)60D)70 ” 相关考题
考题 (31)设有如下通用过程:Public Function Fun(xStr As String)As StringDim tStr As String, strL As IntegertStr=""strL=Len(xStr)i=1i=i+1LoopFun=tStrEnd Function在窗体上画一个名称为 Command1 的命令按钮。然后编写如下的事件过程:Private Sub Command1_Click( )Dim S1 As StringS1="abcdef"Print UCase(Fun(S1))End Sub程序运行后,单击命令按钮,输出结果是( )。A)ABCDEFB)abcdefC)AFBECDD)DEFABC

考题 (7)在窗体上画一个命令按钮,其名称为 Command1,然后编写如下事件过程:Private Sub Command1_Click( )a$="National Computer Rank Examination"n=Len(a$)s=0For i=1 To nb$=Mid(a$, i, 1)If b$="n" Thens=s+1End IfNext iPrint sEnd Sub程序运行后,单击命令按钮,输出结果是 【7】 。

考题 设有如下通用过程:在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如 下事件过程:End Sub 程序运行后,单击命令按钮,则在文本框中显示的内容是( )。A. 30B. 25C. 20D. 15

考题 在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下:Private Function fun(ByVal m As Integer)Ifm Mod2=0 Thenfun=2Elsefun=1End IfEnd FunctionPrivate Sub Command1_Click()Dim i As Integer,s As Integers=0For i=1 To 5s=s+fun(i)NextPrintsEnd Sub程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

考题 在窗体上画一个命令按钮,名称为Command1,然后编写如下事件过程:Private Sub Command1_Cilck()End Sub运行程序,单击命令按钮,则在弹出的信息框的标题栏中显示的是( )。

考题 在窗体上画一个名称为Command1的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function f(m As Integer) If m Mod 2 = 0 Then f = m Else f = 1 End If End Function Private Sub Command1_Click() Dim i As Integer s = 0 For i = 1 To 5 s = s + f(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是A. 11B.10C.9D.8

考题 在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下: Private Function fun(ByVal m As Integer) If m Mod 2 = 0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Cliek() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

考题 设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下: Private Sub Command1 Click( ) Static x A S Integer x=f(x+5) Cls Print X End Sub Private Function f(x As Integer)As Integer f=x+x End Function 连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是( )。A.10B.30C.60D.70

考题 (6)在窗体上有1个名称为Command 1的命令按钮,并有如下事件过程和函数过程:Private Sub Command 1_Click()Dim p As Integerp=m(1)+m(2)+m(3)Print pEnd SubPrivate Function m(n As Integer) As IntegerStatic s As IntegerFor k=1 To ns=s+1Nextm=sEnd Function运行程序,单击命令按钮Command 1的输出结果为【6】。