下列程序输出结果为( )。 Private Sub Command1_Click() a%=10 b%=5 Change a,b Print a,b End Sub Private Sub Change(ByVal a As Integer,b As Integer) Tmp=a a=b b=tmp End Sub
有如下函数过程: 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 该程序的运行结果是( )。
编写如下两个事件过程:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Print Chr(KeyCode)End SubPrivate Sub Form_KeyPress(KeyAscii As Integer)Print Chr(KeyAscii)End Sub一般情况下(即不按住Shift和锁定大写)运行程序,如按“A”键则输出( )。
如果在过程A中用语句:Call proc(a, b) 调用下面的过程Private Sub proc(b As Integer, ByVal a As Integer)a = a + 1b = b * 2End Sub则调用结束后的结果是________。
已知过程定义的首行为 Sub sum(a As Integer, b As Integer) , 则下面过程调用语句中正确的是 ________ 。
执行下列程序后,输出的结果是: Function Fun1(ByVal a As Integer, b As Integer) As Integer Dim t As Integer t = a - b b = t + a Fun1 = t + b End Function Private Sub Command1_Click() Dim x As Integer x = 10 Print Fun1(Fun1(x, (Fun1(x, x - 1))), x - 1) End 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该程序的运行结果是( )。
下列程序输出结果为( )。Private Sub Command1_Click()a%=10b%=5Change a,bPrint a,bEnd SubPrivate Sub Change(ByVal a As Integer,b As Integer)Tmp=aa=bb=tmpEnd Sub
编写如下事件过程:Private Sub Form_KeyDown(KeyCode As Integer,Shift As Integer) If(Button A
在窗体上设计如下两个事件过程: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)Print Chr(KeyCode) End Sub Private Sub Form_KeyPress(KeyAscii As Integer)Print Chr(KeyAscii) End Sub 在程序运行后,按“a”键(不按住Shift
设有如下通用过程:Public Sub Fun(a(),ByVal x As Integer)For i=1 To 5 x=x+a(i)NextEnd Sub在
设有如下通用过程:Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next
设有如下通用过程:Public Sub Fun(a(), ByVal x As Integer)For i=1 To 5x=x+a(i)NextEnd Sub在
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integ
单击命令按钮时,下列程序的执行结果是()。 Private Sub Command1_Click() Dim a As Integer,b As Integer,C As Integer a=3 b=4 c=5 Print SecProc(c,b,a) End Sub Function FirProc (x As Integer,y As Integer,z As Integer) FirProc
在窗体上画一个名称为Command1的命令按钮。编写如下程序: Option Base1 Private Sub Command1_Click() Dim a(10) As Integer For i=1 To 10 a(i)=i Next Call swap((11) ) For i=1 To 10 Print a(i); Next End Sub Sub swap(b()As Integer
在窗体上画—个命令按钮,其名称为Command1,然后编写如下程序: Function M(x As Integer,y As Integer)M=IIf(x>y,x,y) End FUNction Private Sub Command1 Click()Dim a As Integer,b As Integera=100b=200Print M(a,B) End Sub 程序运行后,单击命令按钮
某人编写了下面的程序 Private Sub Command1_Click()Dim a As Integer,b As Integera=InputBox("请输入整数")b=InputBox("请输入整数")pro apro bCall pro(a+b) End Sub Private Sub pro(n As Integer)While(n>0) Print n Mod 10; n=n10W
在窗体上面画一个命令按钮,然后编写如下程序: Function M(x As Integer,y As Integer)As IntegerM=IIf(x>y,x,y) End Function Private Sub Command1_Click()Dim a As Integer,b As Integera=1b=2Print M(a,B) End Sub 程序运行后,单击命令按钮,输出结果为
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function M(x As Integer,y As Integer)As Integer M=IIf(x>y,x,y) End Function Private Sub Command1_Click() Dim a As Integer,b As Integer a=100 b=200 Print M(a,b) End
设一个工程由两个窗体组成,其名称分别为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,
运行下面程序,如果连续三次单击命令按钮之后,A数组共有() 个元素;数组元素A(2)的值是(),A(5)的值是()Option ExplicitOption Base lPrivate Sub Command1_Click()Static A() As Integer,N As IntegerDim I As Integer,K As IntegerK=NN=N+2ReDim Preserve A
在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序; Function M(x As Integer,y As Integer)M=IIf(x>y,x,y) End Function Private Sub Commandl_Click()Dim a As Integer,b As Integera=100b=200PrintM(a,B) End Sub 程序运行后,单击命令按钮,
单击命令按钮后,下列程序代码的执行结果是______ 。 Public Sub fun (Byval a () As Integer) Static n As Integer Do a(n) = a (n) + a(n + 1) n = n + 1 Loop While n < 3 End Sub Private Sub command1_ click() Dim m As Integer, n