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

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

( 22 )命令按钮 Command1 的单击事件过程的代码如下:

Private Sub Command1_Click( )

Dim a(3 , 3)As Integer

For i=1 To 3

For j=1 To 3

a(i , j)=i*j+i

Next j

Next i

Sum=0

For i=1 To 3

Sum=Sum+a(i , 4-i)

Next i

Print Sum

End Sub

运行程序,单击命令按钮,输出结果是( )。

A ) 20

B ) 7

C ) 16

D ) 17


参考答案

更多 “ ( 22 )命令按钮 Command1 的单击事件过程的代码如下:Private Sub Command1_Click( )Dim a(3 , 3)As IntegerFor i=1 To 3For j=1 To 3a(i , j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i , 4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A ) 20B ) 7C ) 16D ) 17 ” 相关考题
考题 设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a(3,3)As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i,4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A.20B.7C.16D.17

考题 设有命令按钮Command1的单击事件过程,代码如下: Private Sub Command1 Click() Dim a(3,3)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=i*j+i Next j Next i Sum=0 For i=1 To 3 Sum=Sum+a(i,4-i) Next i Print Sum End Sub 运行程序,单击命令按钮,输出结果是______。A.20B.7C.16D.17

考题 设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a As IntegerFor i=1 To 30a(i)=iNextFor Each arrItem 【 】aIf arrItem Mod 7=0 Then Print arrItem;If arritem90 Then Exit ForNextEnd Sub请填空。

考题 在窗体上有一个命令按钮Command1,编写事件代码如下:Private Sub Command1_Click()Dim a(10),P(3) As Integerk=5For i=1 To 10For i=1 To 3For i=1 To 3End Sub打开窗体运行后,单击命令按钮,消息框中输出的结果是( )。

考题 在窗体中有一个名为(Command1的命令按钮,Click事件的代码如下:单击命令按钮后,标签显示的结果是( )。

考题 窗体上有一个名称为Command1的命令按钮,其单击事件过程代码如下: Private Sub Command1 Click( ) Static x As Variant n=0 x=Array(1,2,3,4,5,6,7,8,9,10) While n=4 x(n)=x(n+5) Print x(n): n=n+1 Wend End Sub 运行程序,单击命令按钮Command1,窗体上显示的是( )。A.1 2 3 4 5B.6 7 8 9 10C.2 3 4 5 6D.6 2 3 4 5

考题 设有命令按钮Commandl的单击事件过程,代码如下:运行程序,单击命令按钮,消息框输出结果是( )。A. 7B. 8C. 15D. 22

考题 设有一个命令按钮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】。