求VFP高手帮我编写s=1+(1*2)+(1*2*3) +...+(1*2*3*4*5*6*7*8*9*10)的算法。
答案:3 悬赏:70
解决时间 2021-02-08 07:06
- 提问者网友:泪姬迷茫
- 2021-02-08 00:00
求VFP高手帮我编写s=1+(1*2)+(1*2*3) +...+(1*2*3*4*5*6*7*8*9*10)的算法。
最佳答案
- 二级知识专家网友:一起来看看吧
- 2021-02-08 01:01
s=0
for i=1 to 10
x=1
for j=1 to i
x=x*j
endfor
s=s+x
endfor
for i=1 to 10
x=1
for j=1 to i
x=x*j
endfor
s=s+x
endfor
全部回答
- 1楼网友:旧事诱惑
- 2021-02-08 02:05
s=0
for i=1 to 10
for j=1 to i
s=s+j
endfor
endfor
- 2楼网友:闲懒诗人
- 2021-02-08 01:17
he=0 ji=1 i=1 do while i<=10 he=he+ji*i ji=ji*i i=i+1 enddo ?he 试试
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯