粗略地(大写字母所示):
STORE 1 TO c,x
do while .t.
input"任意输入正整数" to a
if int(a)=a.and.a>0
EXIT
else
wait "请输入正整数"
loop
endif
enddo
do while .t.
input"任意输入正整数" to b
if int(b)=b.and.b>0
EXIT
else
wait "请输入正整数"
loop
endif
enddo
if a=b
for q=1 to a
x=x*q
endfor
endif
if a>b
c=b
b=a
a=c
endif
for i=1 to a
x=x*i
endfor
s=x
for j=a+1 to b
x=x*j
s=s+x
endfor
retu