vfp执行如下程序后,显示A的值 set talk off clear store 0 to a,b do while a>=b a=a+b b=b-1 enddoset talk onA.-3 B.6 C.-6 D.0set talk offclearstore 0 to a,bdo while a>=b a=a+bb=b-1enddo
问题描述:
vfp执行如下程序后,显示A的值 set talk off clear store 0 to a,b do while a>=b a=a+b b=b-1 enddo
set talk on
A.-3 B.6 C.-6 D.0
set talk off
clear
store 0 to a,b
do while a>=b
a=a+b
b=b-1
enddo
答
a=0,b=0,a大于等于b成立,a=0+0=0,b=0-1=-1a=0,b=-1,a大于等于b成立,a=0-1=-1,b=-1-1=-2a=-1,b=-2,a大于等于b成立,a=-1-2=-3,b=-2-1=-3a=-3,b=-3,a大于等于b成立,a=-3-3=-6,b=-3-1=-4a=-6,b=-4,a大于等于b不成立,退出...