VFP求阶乘,10!+9!+8!+7!+6!+5!+4!+3!+2!+1!

问题描述:

VFP求阶乘,10!+9!+8!+7!+6!+5!+4!+3!+2!+1!

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