pi2.cpp

来自「计算圆周率可一到小数点后任意位,速度还不错」· C++ 代码 · 共 23 行

CPP
23
字号
// pi2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


/* +++Date last modified: 05-Jul-1997 */

#include <stdio.h>
//#include <iostream.h>
long int a=10000,b,c=2800,d,e,f[2801],g; 
void 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);
} 






⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?