网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
写出下列程序的功能:clears=0fori=1to50s=s+Iendfor?s
参考答案
更多 “ 写出下列程序的功能:clears=0fori=1to50s=s+Iendfor?s ” 相关考题
考题
【程序说明】程序功能是求1!+2!+3!+…+10!的累加和。【程序】SET TALK OFFS=0FOR i=1 TO 10t=1FOR j=1 TO (5)t=t*j(6)s=s+ tNEXT(7)SET TALK ON(5)A.10B.jC.9D.i
考题
下列程序运行后,输出结果为( )。 Dim a() a=Array(1,3,5,7,9) s=0 For i=1 To 4 s=s*10+a(i) Next i Print sA.1357B.3579C.7531D.9753
考题
下列程序的功能是求算式:1+1/2!+1/3!+1/4!+……前10项的和(其中n!的含义是n的阶乘)。请在空白处填入适当的语句,使程序完成指定的功能。Private Sub Commandl_Click ( )Dim i as integer,s as single,a as singlea=1:s=0For i=1 To 10a=_____s=s+aNext iDebug.Print“1+1/2!+1/3!+……=”;SEnd Sub
考题
下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End SubA.0B.3C.6D.9
考题
下列程序运行后的输出结果是______。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
考题
14、下列程序执行后,变量s的值为______。 Dim i%, j%, s% j = 1 s = 0 For i = 4 To 1 Step -1 s = s + i * j j = j * 10 Next iA.4B.24C.1234D.4321
考题
下列程序执行后,变量s的值为______。 Dim i%, j%, s% j = 1 s = 0 For i = 4 To 1 Step -1 s = s + i * j j = j * 10 Next iA.4B.24C.1234D.4321
热门标签
最新试卷