VF编程:分别用DO WHILE-ENDDO和FOR-ENDFOR编程实现求:S=1+3+5+∠∠∠+99

2024-12-02 12:04:11
推荐回答(1个)
回答1:

s=0
i=1
do while i<=99
s=s+i
i=i+2
enddo
?s

s=0
for i=1 to 99 step 2
s=s+i
endfor
?s