窗体上有一个名为Command1的命令按钮,并有下面的程序:Private Sub Command1 Click( )Dim arr(5)As Integer .For k=1 To 5art(k)=kNext kprog art( )For k=1 T0 5Print art(k);Next kEnd SubSub prog(a( )As Integer)n=UBound(a)For i=n To 2 step-1if a(j)a(j十1)Thent=a(j):a(1)=a(j+1);a(j+1)=tEnd IfNext jNext iEnd Sub程序运行时,单击命令按钮后显示的是( )。A.12345B.54321C.01234D.43210
窗体上有一个名为Command1的命令按钮,并有下面的程序:
Private Sub Command1 Click( )
Dim arr(5)As Integer .
For k=1 To 5
art(k)=k
Next k
prog art( )
For k=1 T0 5
Print art(k);
Next k
End Sub
Sub prog(a( )As Integer)
n=UBound(a)
For i=n To 2 step-1
if a(j)<a(j十1)Then
t=a(j):a(1)=a(j+1);a(j+1)=t
End If
Next j
Next i
End Sub
程序运行时,单击命令按钮后显示的是( )。
A.12345
B.54321
C.01234
D.43210
相关考题:
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下:private Sub Command1_Click()Dim an(5) As Integer,arrl(5) As Integern=3For i=1 To 5arr(i)=iarrl(n)=2*n+iNextPrint arrl(n);arr(n)End Sub程序的运行结果为A.3 11B.11 3C.13 3D.3 13
( 34 )窗体上有一个名为 Command1 的命令按钮,并有下面的程序:Private Sub Comand1_Click ()Dim arr ( 5 ) As IntegerFor k=1 To 5arr ( k ) =kNext kprog arr ()For k=1 To 5Print arr ( k )Next kEnd SubSub prog ( a () As Integer )n=U b ound ( a )For i=n To 2 step -1For j=1 To n-1if a ( j ) a ( j+1 ) Thent=a ( j ) :a ( j ) =a ( j+1 ) :a ( j+1 ) =tEnd IfNext jNext iEnd Sub程序运行时,单击命令按钮后显示的是A ) 12345B ) 54321C ) 01234D ) 43210
窗体上有一个名为Command1的命令按钮,并有如下程序: Private Sub Corqmand1_Click( ) Dim a As Integer,b As Integer a=8 b=12 Print Fun(a,b);a;b End Sub Private Function Fun(ByVal a As Integer,b AS Integer)As Integer a=a Mod 5 b=b\5 Fun=a End Function 程序运行时,单击命令按钮,则输出结果是( )。A.3 3 2B.3 8 2C.8 8 12D.3 8 12
在窗体上画一个名称为Command1的命令按钮,然后编写如下程序:Private Sub Commandl_Click( )Static X As IntegerStatic Y As IntegerClsY=1Y=Y+5X=5+XPrint X, YEnd Sub程序运行时,3次单击命令按钮Command1后,窗体上显示的结果为【 】。
在窗体上有一个名称为Command1的命令按钮,并有如下程序:程序执行时,单击命令按钮Command1三次后,窗体上显示的结果为( )。A. 5 16B. 5 6C. 15 15D. 15 6
窗体上有一个名称为Command1的命令按钮,并有如下程序: Private Sub Command1 Click( ) x=14 Do While x0 x=x-3 x=IIf(Int(x/5)=x/5,x+2,x) Loop Print x End Sub 程序运行后,单击命令按钮Command1,输出结果为( )。A.0B.-lC.-2D.-_3
在窗体上添加一命令按钮,其名为Command1,然后编写代码如下。private Sub Command1_Click()Dim arr(5)As Integer,arr1(5)As Integern=3For i=1 To 5arr(i)=iarr1(n)=2*n+iNextPrint arr1(n);arr(n)End Sub程序的运行结果为A.3 11B.11 3C.13 3D.3 13
窗体上有一个名称为Command1的命令按钮,并有如下程序:Private Sub Command1 Click( )x=15Do While x0x=x-3x=IIf(Int(x/5)=x/5,x+2,x)LoopPrint xEnd Sub程序运行后,单击命令按钮Command1,输出结果为( )。A.0B.-lC.-2D.-_3