下面程序运行后,S的值是( )Privatesubform_click()forj=1to10x=j*2-1ifx/3=int(x/3)orx/5=int(x/5)thens=s+xnextjPrints=;sendsubA.27B.30C.32D.37
下面程序运行后,S的值是( )
Privatesubform_click()
forj=1to10
x=j*2-1
ifx/3=int(x/3)orx/5=int(x/5)thens=s+x
nextj
Print"s=";s
endsub
A.27
B.30
C.32
D.37
相关考题:
下面程序运行后输出是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
阅读下列程序。Option Base 1Private Sub Form. Click()Dim x(3,3)For j=l to 3For k=l to 3If j=k then x(j,k)=lIf j<>k then x(j,k)=kNext kNext jCall fun(x())End SubPrivate Sub fun(x() )For j=1 to 3For k=1 to 3Print x(j,k);Next kNext jEnd Sub运行程序时,输出结果为【 】
有如下程序,运行后输出s的值是______。 For j=1 To 20 x=2*j-1 If x Mod 3=0 0r x Mod 7=0 Then s=s+1 Next j Print sA.5B.9C.11D.15
阅读下列程序。Option Base 1Private Sub Form. _Click()Dim x(3,3)For j=1 to 3For k=l to 3If j=k then x(j,k)=1If j<>k then x(j,k)=kNext kNext iCall fun(x())End SubPrivate Sub fun(x())For j=1 to 3For k=1 to 3Print x(j,k);Next kNext jEnd Sub运行程序时,输出结果为【 】。
3下面程序的运行结果是( )。Option Base 1Private Sub Commandl_Crick()Dimx,y(3,3)x=Array(1,2,3,4,5,6,7,8,9)Fori=1 To 3Forj=1 To 3y(i,j)=(i*j)If(j>=i)Then Printy(i,j);NextjPrintNextiEnd SubA.B.C.D.
下面程序运行后,输出的结果是Dim arr(3,3)For j=1 To 3For k=1 To 3Arr(j,k)=(j-1)*3+kNext kNext jFor j=2 To 3For j=2 To 3Print arr(k,j);Next kPrintNext jA.2 5 3 6B.5 8 6 9C.4 7 5 8D.5 9 6 8
下面程序运行后的结果是( )。 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
编写如下程序: Private Sub Form_Click() a$="54321":b$="abcde" For j=1 To 5 Print Mid$(a$,6-j,1)+Mid$(b$,j,1); Next j Print End Sub 程序运行后,单击窗体,其输出结果为 ______。A.a1b2c3d45eB.a5b4c3d2e1C.e1d2c3b4a5D.1a2b3c4d5e
运行下列程序: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