早教吧作业答案频道 -->其他-->
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
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
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
看了 vf问题,我哪里出了错dow...的网友还看了以下:
电脑程序求三位数a的反序输出b输入格式:进一个数字a输出格式:仅输出结果b样例输入:275样例输出 2020-04-07 …
vf问题,我哪里出了错dowhile.t.store1toc,xinput"任意输入正整数"toa 2020-04-26 …
写出下列程序的运行结果.(1)a=input(“a=”);ifa>=0m=a*a-1;melsed 2020-05-13 …
在数组中查找指定元素.输入一个正整数n(1≤n ≤10),然后输入n个整数存入数组a中,再输入一个 2020-05-14 …
matlab程序 解方程组syms a b Rsd Rspf1=72.8*(1+cos(a))-2 2020-05-16 …
Matlab绘图,该程序a=input('请输入a的值:');x=-10:0.1:10; y= 2020-05-16 …
有A、B、C、D4种装置,将1个数输入一种装置后会输出另1个数.装置A:将输入的数加上5;装置B: 2020-06-16 …
有ABCD四种装置,将一个数输入一种装置后会输出另一个数.装置A:将输入的数加5,装置B:将输入的 2020-06-16 …
3.输出所有水仙花数到数组a,输出数组a。(说明:若一个3位数的各3.输出所有水仙花数到数组a,输 2020-07-31 …
TheEuclideanalgorithmisusedtofindthegreatestcommon 2020-10-30 …