Private Sub Command1_Click()
s=P(1) + P(2) + P(3) + P(4)
Print s
E.nd Sub
Public Function P(N As Integer)
Static Sum
F.or i=1 To N
Sum=Sum + i
Next i
P=Sum
E.nd Function( )。
A.15
B.25
C.35
D.45
[单选题]单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click()B.T 4E.nd SubPrivate Sub BT(x As Integer)x=x * 2 + 1If x < 6 ThenC.all BT(x)E.nd Ifx=x * 2Print x;E.nd Sub( )。A.15B.16C.17D.18
[单选题]单击一次命令按钮后,下列程序的执行结果是( )。 Private Sub Commandl_Click() s=P(1)+P(2)+P(3)+P(4) Print s End Sub Public FunctionP(N As Integer) Static Sum Fori=1To N Sum=Sum+i Nexti P=Sum End FunctionA.15B.25C.35D.45
[单选题]单击一次命令按钮后,下列程序的执行结果是 Private Sub Command1_Click() s=P(1) +P(2) +P(3) +P(4) Print s End Sub Public Function P(N As Integer) Static Sum For i=1 To N Sum=Sum+i Next i P=Sum End FunctionA.15B.25C.35D.45
[单选题]单击命令按钮,下列程序的执行结果为Private Sub Command1_Click()D.im x As Integer, y As Integerx=32: y=42C.all PCS(x, y)Print x; yE.nd SubPublic Sub PCS(Byval n As Integer, ByVal m As Integer)n=n Mod 10+1m=m Mod 10+1E.nd Sub ( )。A.32 42B.2 32C.2 3D.12 3
[单选题]单击命令按钮时,下列程序的执行结果为Private Sub Command1_Click()D.im a As Integer, b As Integer, c As Integera=2: b=3: c=4Print P2(c, b, A.E.nd SubPrivate Function P1(x As Integer, y As Integer, z As Integer)P1=2 * x + y + 3 * zE.nd FunctionPrivate Function P2(x As In
[单选题]单击命令按钮时,下列程序的执行结果为Private Sub Command1_Click()D.im x As Integer, y As Integerx=12: y=32C.all PCS(x, y)Print x; yE.nd SubPublic Sub PCS(ByVal n As Integer, ByVal m As Integer)n=n Mod 10m=m Mod 10E.nd Sub( )。A.12 32B.2 32C.2 3D.12 3
[单选题]单击一次命令按钮后,下列程序的执行结果为Private Sub Command1_Click()D.im m As Integer,I As Integer,x(10) As IntegerF.or I=0 To 4:x(I)=I+1:Next IF.or I=1 TO 2:Call Prioc(x):Next IF.or I=0 TO 3:Print x(I);:Next IE.nd SubPrivate Sub Prioc(a()As Integer)Static I As IntegerD
[单选题]单击命令按钮时,下列的执行结果为Private Sub Command1_Click()D.im x As Integer, y As Integerx=86: y=29C.all Proc(x, y)Print x; yE.nd SubPublic Sub Proc(n As Integer, ByVal m As Integer)n=n Mod 10m=m Mod 10E.nd Sub( )。A.12 32B.6 29C.2 3D.12 3
[单选题]有下列程序段,单击命令按钮执行程序后,输出结果是( )。Option Base 1Private Sub Command1 Click()D.im xx=Array(23,-5,17,38,-31,46,11,8,5,-4)31=0s2=0F.or k=1 To 10If(x(k)>0)ThenS1=S1+x(k)E.lses2=s2+x(k)E.nd IfNext kY=s1/Abs(s2)Print YE.nd SubA.148B.40C.40D.3.7
[单选题]单击命令按钮,下列事件过程的执行结果为Private Sub Command1_Click()D.im x As Integer, y As Integerx=40: y=72C.all PtoP(x, y)Print x; yE.nd SubPublic Sub PtoP(Byval n As Integer, ByVal m As Integer)n=n \ 10+2m=m \ 10+2E.nd Sub( )。A.0 8B.40 72C.4 50D.78 50