网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
执行下列程序段后,变量 s 的值是: s = 0 For x=99 to 1 Step -2 s = s + x Next x
A.100
B.500
C.2500
D.5000
参考答案和解析
C
更多 “执行下列程序段后,变量 s 的值是: s = 0 For x=99 to 1 Step -2 s = s + x Next xA.100B.500C.2500D.5000” 相关考题
考题
已知程序段 S=0 For i=1 To 10 step 2 S=S+1 i=i*2 Next i 当循环结束后,变量i,s的值分别为( )。A.10,6B.11,4C.22,3D.16,5
考题
下面的程序要计算1+2+…+10,请补充完整。其中s是单精度类型的变量。Dim x as Integer, s as Singles=0For x=1 to 10s=【 】Next x
考题
将下面的程序填写完整,如要计算1+2+…+10,请完成下面的程序,其中,s是单精度类型的变量。Dim x as Integer,s as Singles=0For x=1 to 10s=【 】Next x
考题
(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
考题
已知程序段: s=0 For i=0 to 10 step 2 S=S+1 i=i*2 Next i 当循环结束后,变量i、s值分别为( )。A.22,3B.11,4C.10,5D.16, 6
考题
有如下程序,运行后输出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
考题
已知程序段: s=0 For i=1 to 10 step2 s=s+l i=i*2 Next i当循环结束后,变量i、s值分别为( )。A.22、3B.11、4C.10、5D.16、6
考题
已知程序段:s=0For i=1 To 10 Step 2s=s+1i=i*2Next i当循环结束后,变量i的值为______,变量s的值为______。A.10,4B.11,3C.22,3D.16,4
考题
下列程序的运行结果为______。Private Sub Command1_ Click() Dim s As Long Dim x As Integer s = 0 for x = 99 To 1 step - 2 s=s+ x Next x Print sEnd SubA.100B.500C.2500D.5000
考题
下列程序执行后,变量S的值为 Dim s As Long,x As Integer s=0 For x=1 To 10 Step 2 s=s+x Next x Text1.Text=sA.10B.25C.50D.100
考题
已知程序段: s=0 For i=1 To 10 Step 2 s=s+1 i=i*2 Next i 当循环结束后,变量i的值为______,变量s的值为______。A.10,4B.11,3C.22,3D.16,4
考题
已知程序段:s=0Fori=1To10Step2s=s+1i=i*2Nexti当循环结束后,变量i的值为______,变量s的值为______。A.104B.113C.223D.164
考题
下列程序段的执行结果为______。S= 0: T= 0: U=0For X = 1 To 3 For Y = 1 To X For Z = Y To 3 S= S +1 Next Z T=T+1 Next Y U=U+1Next XPrint S; T;UA.3 6 14B.14 6 3C.14 3 6D.16 4 3
考题
有下列程序段,单击命令按钮执行程序后,输出结果为( )。 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.3.7
考题
下列程序执行后,变量S的值为______ 。 Dim s As Long,X As Integer s=0 X=1 Do While x<10 s= s+ x x=x+2 Loop Print sA. 10B.25C.50D.100
考题
已知程序段: s = 0 For i = 1 To 10 Step 2 s = s + 1 i = i * 2 Next i 当循环结束后,变量i和s的值分别为______A.10 4B.11 3C.22 3D.16 4
考题
执行下列程序后,变量s的值是( )。SET TALK OFFCLEARx=〝l2345〞s=〝〞1=LEN(x)DO WHILE l>;1x1=SUBSTR(x,1-1,2)s=s+x11=l-2ENDD0?sA.2345B.4523C.54321D.45231
考题
已知程序段: s=0 For i=0 to 10 step 2 s=s+l i=i*2 Next i 当循环结束后,变量i、s值分别为( )。A.22,3B.11,4C.10,5D.16,6
考题
单选题以下程序段执行后,整型变量s的值为()。 s=4 For i=1 To 4 s=s-1 Next iA
0B
-1C
4D
5
热门标签
最新试卷