运行下列程序:Private Sub form_Click( )For i = 1 To 2x = 1For j = 1 To 3x = 5For k = 1 To 4x = x + 2Next kNext jNext iPrint xEnd Sub单击窗体后,则输出结果是( )。A.5B.13C.25D.48
运行下列程序:
Private Sub form_Click( )
For i = 1 To 2
x = 1
For j = 1 To 3
x = 5
For k = 1 To 4
x = x + 2
Next k
Next j
Next i
Print x
End Sub
单击窗体后,则输出结果是( )。
A.5
B.13
C.25
D.48
相关考题:
下面程序运行后,窗体中显示【 】。Private Sub Command1_Click) ( )aS ="*" :b$ ="$"For k = 1 To 3x$ =Strings (Len(a$) +k,b$ )Print x $;NextPrintEnd Sub
列程序的功能是:将数据1,2,…,10写入顺序文件Base.txt中,请填空。Private Sub Form_Click()Dim i As IntegerOpen 【11】 As #1For i=1 To 10【12】Next iClose #1End Sub
下列程序的功能是:将数据1,2,…,8写入顺序文件Num.txt中,请补充完整。Private Sub Form_Click()Dim i As IntegerOpen "Num.txt"For Output As #1For i=1 To 8【15】Next iClose #1End Sub
有以下程序:Private Sub Form_Activate()For j=1 to 3x=3For i=l to 2x=x+6NextNextPrint xEnd Sub程序运行后,窗体上显示的结果为______。
有如下程序,该程序的执行结果是【 】。Private Sub Command1_lick()For i= 1 To 4x= 4For j =1 To 3x =3For k=1 To 2X= K+5Next kNext jNext iPrint xEnd Sub
下面程序运行后输出是Private Sub Form_Click()for i=1 to 4x=1for j=1 to 3x=3for k=1 to 2x=x+6next knext jnext iprint xEnd SubA.7B.15C.157D.538
运行下列程序,单击窗体后输出的结果是( )。Private Sub Form_Click()Dim aDim s As Integer, i As Integera = Array(1, 2, 3, 4, 5, 6)s = 1For i = 5 To 1 Step -2s = s * a(i)Next iPrint sEnd SubA、 15B、 48C、 120D、 720
阅读程序:Function fac(ByVal n As Integer)As IntegerDim temp As Integertemp=1For i%=1 To ntemp=temp*i%Next i%fac=tempEnd FunctionPrivate Sub Form_Click()Dim nsum As Integernsum=1For i%=2 To 4nsum=nsum+fac(i%)Next i%print nsumEnd Sub程序运行后,单击窗体,输出结果是A.35B.31C.33D.37
( 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
设有以下窗体单击事件过程:Private Sub Form_Click()a=1For i=1 To 3End SelectNext iEnd Sub打开窗体运行后,单击窗体,则消息框的输出内容是( )。
请阅读程序:Private Sub Form_Click()m=1For i=4 To 1 Step-1Print Str(m);m=m+1For j=1 To iPrint”*”;Next jPrintNext iEnd Sub程序运行后,单击窗体,则输出结果是( )。A.1**** 2*** 3** 4*B.4* 3** 2*** 1****C.**** *** ** *D.* ** *** ****
有以下程序:Private Sub Form_Activate()For j=1 to 3x=3For i=1 to 2x=x+6NextNextPrint xEnd Sub程序运行后,窗体上显示的结果为______。
在窗体画一个命令按钮,然后编写如下事件过程:Private Sub Command1_CIick()Dim a(1 To 10)Dim p(1 To 3)k=5For i =1 To 10a(i)=iNext iFor i=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。
阅读下列程序: Private Sub Command1_Click( ) Dim i As Integer,k As Integer k=2 For i=1 To 3 Print H(k); Next i End Sub Function H(j As Integer) a=0 Static b a=a+1 b=b+1 H=a*b+j End Function 程序运行后,单击命令按钮输出结果是A.234B.345C.567D.356
阅读下面的程序: Private Sub Command1_Click() For i=1 To 3 For j=1 To i For k=j To 3 x=x+1 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,窗体上输出的结果是A.3B.9C.14D.21
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()For i=1 To 4x=4For j=1 To 3X=3For k=1 To 2x=x+6NextNextNextPrint xEnd Sub 程序运行后,单击命令按钮,输出的结果是A.7B.15C.157D.538
有如下程序,该程序的执行结果是【 】。Private Sub Command1 Click()For i=1 To 4x=4For j=1 To ix =3For k=1 To 2x= x + 5Next kNext jNext iPrint xEnd Sub
有如下程序:Private Sub Form_Click()E=1:F=1For j=1 To 3E=E+F:F=F+ENextPrint E;FEnd Sub该程序的输出结果是A.6 6B.5 8C.13 21D.34 55
Private Sub Form_Activate()Forj=1 to 3x=3ForI=1 to 2x=x+6NextINextjPrint xEnd Sub程序运行后,窗体上显示的结果为上______。
当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
下面程序运行后的结果是( )。 Private Sub Form_Click() Dim s As Integer,k As Integer,i As Integer,n As Integer s=1 fori=1 to 3 forj=i to 3 for k=j to istep-1 s=s*k nextk,J,i print s End SubA.6B.72C.144D.432
窗体上有一个名为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.12345B.54321C.01234D.43210
下面程序运行后输出是 ______。 Private Sub Form_Click() for i=1 to 4 x=1 for i=1 to 3 x=3 for k=1 to 2 x=x+6 next k next j next i print x End SubA.7B.15C.157D.538
下面程序段的运行结果是( )。 Private Sub Form_Click() For I=3 to 1 step-1 Print Spc(10-I); For j=1 to 2*I-1 print"*"; Next j Print Next I End SubA.***** *** *B.* *** *****C. * *** *****D. * *** *****
运行下列程序:Private Sub Form_Click( )Dim a As Integera = 1For i = 1 To 5Call fun1(a)Next iPrint aEnd SubPrivate Sub fun1(x)y = 2Dox = x + yLoop Until x 10End Sub单击窗体后,则在窗体上显示的结果是( )。A.5B.1 2 3 4 5C.19D.7
当发生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
下列程序运行后的输出结果是______。Private Sub f(k,s)s=1For j=1 To ks=s*jNextEnd SubPrivate Sub Command1_Click()Sum=0For i=1 To 3Call f(i,s)Sum=Sum+sNextPrint SumEnd Sub