计算1+2+3+……+2010的值。
this program is:
data temp;
s=0;
i=1;
do until (i>2010);
s=s+i;
i=i+1;
end;
put "the sum of 1 to 2010 is" s;
/* use put means the result will appear in log window.*/
run;
博客原文地址:
http://hi.baidu.com/_guobailing/blog/item/fa33121274dde419c83d6dca.html