单项选择题

在窗体上画一个名称为Command1的命令按钮,然后编写如下程序:
Private Sub Command1_Click()
Static A As Integer
Static B As Integer
Cls
B=2
B=B+3
A=3+A
Print A,B
End Sub
程序运行时,三次单击命令按钮Command1后,窗体上显示的结果为( )。

A.3 5
B.6 6
C.9 5
D.3 3
<上一题 目录 下一题>
热门 试题

单项选择题
当Form1_Click事件发生时,写出在窗体上显示的第二行和第三行是( )。 Private a As Integer,c As Integer Private Sub Form_Click() Dim a As Integer,b As Integer a=10:b=10:c=10 Print a,b,c Call test1(a,b) Print a,b,c End Sub Private Sub test1(m As Integer,ByVal n As Integer) Dim c As Integer m=5:n=5:c=5 Print m,n,c End Sub
A.5 5 5
5 10 10
B.5 5 5
5 5 10
C.5 5 10
5 10 10
D.5 5 5
10 10 10
单项选择题
程序代码如下,当单击窗体上的Command1控件时,窗体上显示的结果是( )。 Option Base 1 Private Sub Command1_Click() Dim i As Integer Dim x(3,3)As Integer For i=1 To 3 For j=1 To 3 x(i,j)=(i-1)*3+j Next j Next i For i=1 To 3 Print x(i,4-i); Next i End Sub
A.1 5 9
B.1 4 7
C.3 5 7
D.3 6 9
相关试题
  • 当Form1_Click事件发生时,程序的输出结...
  • 在窗体Form1中有一个名称为Image1的图像...