有史以来最经典的 C 程序, 4行语句计算 800 位的 PI 值,大家可以读一下
tanes 2003-10-19 11:18:33 大家可以读一下 ,有兴趣的话,可以把它翻译一下, 我看过一个翻译,好像有整整一页
long a=10000,b,c=2800,d,e,f[2801],g;
main(){for(;b-c;)f[b++]=a/5;
for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)
for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b);}