vfp编写程序计算1+2+3+42

vfp编写程序计算1+2+3+42

你写错题目了吧? 应该是:
1+2+3+.....+42

clear
s=0
for i=1 to 42
s=s+i
endfor
?s
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答
大家正在搜