假定有如下的Sub过程:Sub S(x As Single,y As Single)t=xx=t/yy=t Mod y End Sub在窗体上画一个
相似题目
-
假定以定义了一个过程sub add(a as single, b as single),则正确的调用语句是()
-
若有一个过程定义成Public Sub W1(ByVal x As Integer,y As Integer),调用过程的正确形式是()
-
有如下函数过程: Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 * y + z + 2 * x End Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a) End Sub 该程序的运行结果是( )。
-
假定有如下的Sub过程:Sub fun(x As Single, y As Single)t = xx = t / yy = t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As SingleDim b As Singlea = 6b = 4fun a, bPrint a, bEnd Sub程序运行后,单击命令按钮,输出结果为( )。
-
在窗体上画一个名称为Label1的标签,然后编写如下事件过程:Private Sub Form_Click()Dim S As IntegerS = 0For i = 1 To 15x = 2 * i - 1If x Mod 3 = 0 ThenS = S + 1End IfNext iLabel1.Caption = SEnd Sub运行程序,单击窗体,标签中显示的是________。
-
在窗体上画一个名称为Label1的标签,然后编写如下事件过程:Private Sub Form_Click()Dim S As IntegerS = 0For i = 1 To 15x = 2 * i - 1If x Mod 3 = 0 ThenS = S + 1End IfNext iLabel1.Caption = SEnd Sub运行程序,单击窗体,标签中显示的是________。
-
有如下函数过程:Function secproc(x As Integer, y As Integer, z As Integer)secproc = 3 * y + z + 2 * xEnd FunctionPrivate Sub Command1_Click()Dim a As Integer, b As Integer, c As Integera = 2: b = 3: c = 4Print secproc(c, b, a)End Sub该程序的运行结果是( )。
-
求1!+2!+……+10!的程序如下: Private Function s(x As Integer) f=1 For i=1 To x f=f*i Next s=f End Function Private Sub Command1_Click() Dim i As Integer Dim y As Long For i=1 To 10 _____________ Next Print y End Sub
-
假定有如下的Sub过程:Sub Sub1 (x As Single, y As Single)t=xx = t/yy = t Mod yEnd Sub在窗体
-
有如下事件过程:Prirate Sub Form_Click()A$="123": B$="456"x=Val(A$)+Val(B$)Print x\100End S
-
编写如下事件过程;Private Sub Form_ MouseDown (Button As Integer, Shift As Integer, X As Si
-
设有如下通用过程:Public Sub Fun(a(),ByVal x As Integer)For i=1 To 5 x=x+a(i)NextEnd Sub在
-
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序: Public Enum S a=4 b=3 End Enum Private Sub Command1 Click() Dim x As Integer x=a If x>=3 Then MsgBox"Pass!" End Sub 运行程序,其结果是()。
-
编写如下事件过程:Private Sub Form-MouseDown(Button As Integer,Shift As Integer,X As Single
-
设有一个命令按钮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次单击命令按钮后,窗体显示的计算结果是()。
-
设有如下通用过程:Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next
-
编写如下事件过程;Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single
-
设有如下通用过程:Public Sub Fun(a(), ByVal x As Integer)For i=1 To 5x=x+a(i)NextEnd Sub在
-
假定有如下的Sub过程:Sub sfun(x AsSingle,y AsSingle)t=xx=t/yy=t Mod yEnd Sub在窗体上添加一
-
在窗体上有一个名称为Command1的命令按钮,并有如下事件过程和函数过程: Private Sub Command1_Click() Dim p as Integer p=m(1)+m(2)+m(3) Print p End Sub Private Function m(n As Integer) As Integer Static s As Integer For k=1 To n s=s+1
-
设一个工程由两个窗体组成,其名称分别为Form1和Form2,在Form1上有一个名称为Command1的命令按钮。窗体Form1的程序代码如下: Private Sub Command1_Click() Dim a As Integer a=10 Call g(Form2,a) End Sub Private Sub g(f As Form, X As Integer) y=IIf(x>,10,
-
在窗体上有1个名称为Command1的命令按钮,并有如下事件过程和函数过程: Private Sub Command1_Click() Dim p As Integer p=m(1)+m(2)+m(3) Print p End Sub Private Function m(n As Integer)As Integer Static s As Integer Fork=1 To n s=s+1 N
-
有如下函数过程: Function Fun(By Val x As Ingeger,ByVal y As Integer) As Integer DO While …y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim
-
在窗体上画一个命令按钮,其名称为Command1,然后编写如下事件过程: Private Sub Command1_Click() aS="National Computer Rank Examination" n=Len(a$) s=0 For i=1 To nb$=Mid(as,i,1)If b$="n"Then s=s+1End If Next i Print S End Sub 程序运行后