> 英语 >
VFP求阶乘,10!+9!+8!+7!+6!+5!+4!+3!+2!+1!
人气:306 ℃ 时间:2020-01-28 16:45:23
解答
clear
s=0
for i=10 to 1 step -1
p=1
for j=1 to i
p=p*j
endfor
s=s+p
endfor
"10!+9!+8!+7!+6!+5!+4!+3!+2!+1!=",s
return
推荐
猜你喜欢
© 2025 79432.Com All Rights Reserved.
电脑版|手机版