早教吧 育儿知识 作业答案 考试题库 百科 知识分享

vf问题,我哪里出了错dowhile.t.store1toc,xinput"任意输入正整数"toaifint(a)=a.and.a>0nextelsewait"请输入正整数"loopendifenddodowhile.t.input"任意输入正整数"tobifint(b)=b.and.b>0nextelsewait"请输

题目详情
vf问题,我哪里出了错
do while .t.
store 1 to c,x
input"任意输入正整数" to a
if int(a)=a.and.a>0
next
else
wait "请输入正整数"
loop
endif
enddo
do while .t.
input"任意输入正整数" to b
if int(b)=b.and.b>0
next
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
endi
for i=1 to a
x=x*i
endf
s=x
for j=a+1 to b
x=x*j
s=s+x
endf
retu
▼优质解答
答案和解析
粗略地(大写字母所示):
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