运行程序段后单击窗体,则输出结果为( )。
A.21
B.13
C.8
D.25
[单选题]有下列程序段,单击命令按钮执行程序后,输出结果为( )。 Option Base 1 Private Sub Command1_Cliek() Dim x x=Array(23, -5, 17, 38, -31, 46, 11, 8, 5, -4) s1=0 s2=0 Fork=1 To 10 If (x(k)>0) Then s1=s1+x(k) Else s2=s2+x(k) End If Next k Y=s1/Abs(s2) Print Y End SubA.148B.40C.-40D.
[单选题](35)有下列程序段,单击命令按钮执行程序后,输出结果是 。Option Base 1Private Sub Commandl_Click() Dim x x=Array(23,-5,17,38,-31.46,11,8,5,-4) s1=0 s2=0 For k=1 To 10 If(x(k)>0)Then s1=sl+x(k) Else s2=s2+x(k) End If Next k Y=s1/Abs(s2) Print Y End SubA.148 B.40 C.-40 D.3.7
[单选题]有下列程序段,单击命令按钮执行程序后,输出结果是( )。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
[单选题]有以下程序段:程序运行后的输出结果是( )。A.a=10 b=50 C=30B.a=10 b=50 c=10C.a=10 b=30 c=10D.a=50 b=30 c:50
[单选题]下列程序段运行后,输出结果为()A . 42B . 39C . 6D . 1
[单选题]若有以下程序段:程序运行后的输出结果是( )。A.16B.8C.4D.2
[单选题]有下列程序,程序运行后单击命令按钮,则输出的结果为( )。Private Sub Command1_Click()Dim a%(1 To 4),b%(3 To 6),i%,s1#,s2# For i=1 To 4 a(i)=i Next i For i=3 To 6 b(i)=i Next i s1=Factorial(A) s2=Factorial(B)Print "s1=";s1;"s2=";s2End SubFunction Factorial(a()As Integer)Dim
[单选题]以下程序运行时,单击窗体后,在窗体上输出的结果是 ______。 Private SubForm_Click() Dim a As Integer,b As Integer a=10 :b=20 Call ff(a,B)Print a,b End Sub Private Sub ff(x As Integer,y As Integer) x=x+y y=x+y End SubA.30 50B.30 30C.20 20D.10 20
[单选题]若有以下程序,当程序运行后,单击命令按钮,则输出的结果为( )。 Private Sub Command1_Click() Dim a%(1 To 4), b%(3 To 6), i%, s1#, s2# For i= 1 To 4 a(i) = i Next i For i=3 To 6 b(i) = i Next i s1 = Factorial (A) s2 = Factorial (B) Print "s1="; s1; "s2="; s2 End Sub Function Fa
[单选题]下列程序段运行后窗体上输出结果为( )。 Private Sub Command1 Click() a=5:b=4:c=3:d=2 X=3>2*b Or a=c And b<>C Or c>d Print X End SubA.1B.TrueC.FalseD.2