程序段如下,当发生Form_Click事件时,窗体上输出的结果是( )。 Option Explicit Private x As Integer Public y As Integer Sub Test() Dim y as integer x=2:y=2 Print"x1=";x;"y1=";y End Sub Private Sub Form_Click() x=1:y=1 Test Print "X2=";x;"y2=";y End SubA.x1=2 y1=2 x2=2 y2=1B.x1=2 y1=2 x2=2 y2=2C.x1=2 y1=1 x2=2 y2=2D.x1=2 y1=1 x2=2 y2=1
程序段如下,当发生Form_Click事件时,窗体上输出的结果是( )。 Option Explicit Private x As Integer Public y As Integer Sub Test() Dim y as integer x=2:y=2 Print"x1=";x;"y1=";y End Sub Private Sub Form_Click() x=1:y=1 Test Print "X2=";x;"y2=";y End Sub
A.x1=2 y1=2 x2=2 y2=1
B.x1=2 y1=2 x2=2 y2=2
C.x1=2 y1=1 x2=2 y2=2
D.x1=2 y1=1 x2=2 y2=1
相关考题:
执行下列程序后,鼠标单击窗体,输出结果为 。Private Sub Form_Click()Print "Click";End SubPrivate Sub Form_MouseDown(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print "Donw"End SubPrivate Sub Form_MouseUp(Button As Integer, Shift _As Integer, X As Single, Y As Single)Print " Up"End Sub( )。A.DownUpClickB.ClickDownUpC.DownClickUpD.UpDownClick
有如下事件过程: Prirate Sub Form_Click() A$="123": B$="456" x=Val(A$)+Val(B$) Print x\100 End Sub 程序运行后,单击窗体,则窗体上显示的内容是______。A.123B.3C.5D.579
设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Const a=6 Dim x (a) As Integer For I=1 to a x(i)=1^2 Next I Print x(i) End SubA.36B.25C.1D.出错信息
假定有如下事件过程: Privte Sub Form_Click0 Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是( )。A.81 4B.56 3C.28 1D.243 5
有如下程序: Private Sub Form_Click() Dim i As Integer,Sum As Integer Sum=0 For i=2 To 10 If i Mod 2<>0 And i Mod 3=0 Then Sum=Sum+i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
(26)在窗体上放置一个命令按钮Command1,并编写下列单击事件的程序: Private Option Base 1 Sub Command1_Click() Dim c As Integer,d As Integer d=0 c=6 X=Array(2,4,6,8,10,12) For i=1 To 6 IfX(i)c Then d=d+X(i) c=X(i) Else d=d-c End If Next i Print d End Sub 程序运行后,单击命令按钮,则在窗体上输出的结果是 。A.10 B.12 C.16 D.20
假定有如下事件过程:Private Sub Form_Click()Dim x As Integer, n As Integerx = 1n = 0Do While x 28x = x * 3n = n + 1LoopPrint x, nEnd Sub程序运行后,单击窗体,输出结果是( )。A.81 4B.56 3C.28 1D.243 5
在窗体上画一个名称为Labell的标签,然后编写如下事件过程: Option Base 1 Private Sub Form_Click() Dim a(20) As Integer For k=1 To 20 a(k)=k^2 Next k Label1.Caption=a(k) End Sub 程序运行后,单击窗体,在标签中显示的内容是 ______。A.400B.20C.441D.出错信息
在窗体上画一个命令按钮,其名称为Commandl,然后编写如下程序:Function a(x As Integer, y As Integer) As Integera = IIf(x > y, x, y)End FunctionPrivate Sub Command1_Click()Dim n As Integer, m As Integern = 10m = 20Print a(n, m)End Sub程序运行后,单击命令按钮,输出结果是______。
当Form_Click事件发生时,程序输出的结果是 ______。 Private Sub Form. Click() Dim a As Integer,b As Integer,c As Integer a=1: b=1 Print a; b Do c=a+b Print c a=b:b=c Loop Until c>=5 End SubA.1 1 1B.2 3 5C.2 5 7D.2 3 4
有如下程序: Private Sub Form_Click( ) Dim i As Integer, Sum As Integer Sum = 0 For i = 2 To 10 If i Mod 2=0 And i Mod 3<>0 Then Sum = Sum + i End If Next Print Sum End Sub 程序运行后,单击窗体,输出结果为A.12B.30C.24D.18
执行下面程序,第一行输出结果是【 】,第二行输出结果是47。Option ExplicitPrivate Sub Form_Click( )Dim A As IntegerA=2Call Sub1 (A) End SubPrivate Sub1 (x As Integer)x=x*2+1If x<10 ThenCall Sub1 (x)End Ifx=x*2+1Print xEnd Sub
假定有如下事件过程: Privte Sub Form_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是A.81 4B.56 3C.28 1D.243 5
在窗体上绘制一个名称为Command1的命令按钮,然后编写如下程序: Option Base 1 Private Sub Commandl_Click() Dim c As Integer,d As Integer d=0 c=6 x=Array(2,4,6,8,10,12) For i=1 To 6 If x(i)>c Then d=d+x(i) c=x(i) Else d=d-c End If Next i Print d End Sub 程序运行后,如果单击命令按钮,则在窗体上输出的内容为A.10B.16C.12D.20
设有如下程序:Prirate Sub Form_Click()Dim a As Integer,b AS Integera=20:b=50p1 a,bp2 a,bp3 a,bPrint"a=";a,"b=";bEnd SubSub p1(x As Integeh By Val y As Integer)x=x+10y=y+20End SubSub p2(ByVal x As Integer,y As Integer)x=x+10y=y+20End SubSub p3 (ByVal x As Integer,ByVal y As Integer)x=x+10y=y+20End Sub该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。
以下程序运行时,单击窗体后,在窗体上输出的结果是 ______。 Private SubForm_Click() Dim a As Integer,b As Integer a=10 :b=20 Call ff(a,B)Print a,b End Sub Private Sub ff(x As Integer,y As Integer) x=x+y y=x+y End SubA.30 50B.30 30C.20 20D.10 20
编写如下事件过程: Option Explicit Private Sub Form_Click() Dim Str As String, I As Integer Open "examp" For Output As 1 For I=1 To 5 Str=Chr(I+64) Print #1,Str; Next I Close 1 Open”examp',For lnput AS 2 Str=Input(10,#2) Print Str; Close 2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.ABCDEB.96C.65D.abcde
当Form_Click;事件发生时,窗体上显示的第三行是 ______。 Private Sub Form_Click() Dim i As Integer, j As Integer, k As Integer Dim x(5, 5) As Integer For i = 1 To 5 k = 1 For j = 1 To 5 If i <= j Then x(i, j) = k + 1 k=k+2 Else x(i, j) = k + 1 End If Next j Next i For i = 1 To 5 For j = 1 To 5 Print x(i, j) Next j Print Next i End SubA.22135B.21357C.22213D.13579
在窗体上放置一个命令按钮Command1,并编写下列单击事件的程序: Option Base 1 Private Sub Command1_Click() Dim c As Integer,d As Integer d=0 c=6 X=Array(2,4,6,8,10,12) For i=1 To 6 If X(i)>c Then d=d+X(i) c=X(i) Else d=d-c End If Next i Print d End Sub 程序运行后,单击命令按钮,则在窗体上输出的结果为( )。A.10B.12C.16D.20
当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End SubA.7 75 66 60 7 80 126 60B.7 75 66 60 7 75 126 60C.7 75 66 60 7 80 66 60D.7 75 66 60 7 75 66 60
程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End SubA.32B.28C.30D.36
运行下列程序:Private Sub Form_Click( )Dim x As Integer, y As String, z As Stringy = 12345For x = 1 To Len(y)z = Mid(Left(y, x), 1)Next xPrint zEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.1B.11111C.55555D.12345
运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x > 20x 运行下列程序:Private Sub Form_Click( )Dim y As Integer, x As IntegerDo Until x 20x = x + 10y = y + xIf x 20 Then Exit DoLoopPrint x, yEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.10 20B.30 60C.10 30D.20 60
当发生Form_Click事件时,窗体上显示的第三行是( )。 Option Base 1 Private Sub Form_Click() Dim i As Integer,j As Integer,k As Integer Dim a(5,5)As Integer For i=1 To 5 k=1 For i=1 To 5 If(i<=j)Then a(i,j)=k k=k+2 Else a(i,j)=k+1 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j); Next j Print Next i End SubA.1 3 5 7 9B.2 1 3 5 7C.2 2 2 1 3D.2 2 1 3 5