请教Visual FoxPro高手“请输入3—10之间的整数N,求1!+3!+ 5! + 7! + 9!……+n!”用Visual FoxPro程序怎么
“请输入3—10之间的整数N,求1!+3!+ 5! + 7! + 9!……+n!”用Visual FoxPro程序怎么写
“请输入3—10之间的整数N,求1!+3!+ 5! + 7! + 9!……+n!”用Visual FoxPro程序怎么写
答案:clear
input "请输入3-10之间的整数N:" to n
x=0
for i=1 to n step 2
s=1
for j=1 to i
s=s*j
endfor
x=x+s
endfor
?x