九重神格txt下载80:vfp题:1~100奇数和

来源:百度文库 编辑:高校问答 时间:2024/07/09 06:42:55
程序题
谢谢
要求用do和if语句

i=0
s=0
do while i<100
i=i+1
if mod (i,2)=d
loop
endif
enddo
?"1-100之间的奇数和为:",s
方法2:
store 0 to s
for i=1 to 100 step 2
s=s+i
next
...