#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double pi=0.0;
for(float i=1.0;i<=50;i++)
{
pi=pi+1.0/i/i;
}
pi=sqrt(pi*6);
cout << "π = " << pi<<endl;
system("pause");
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.241.88