求出 1 到 5000 之间的能被 5 整除的前若干个偶数之和,当和大于 500 时程序退出。
大家帮忙看一些这样写对不对clear
s=0
for i=1 to 5000
do while i%5=0 and i%2=0
s=s+i
if s>500
exit
endif
endd
next
?s
2014-12-02 22:22
2014-12-03 08:22
2014-12-03 08:23
2014-12-03 08:32
2014-12-03 08:41
2014-12-03 08:42
2014-12-03 08:47
2014-12-03 08:58
2014-12-03 09:10
2014-12-04 13:58