作者oldfatty (無姦道之魚紋肥..)
站內NTUBIME96-HW
標題第二題
時間Mon Dec 8 23:36:04 2003
#include "stdafx.h"
#include "iostream"
using std::cout;
using std::endl;
#include "cmath"
int main()
{
float total=0;
for (int i=1;i<=50;i++)
total=total+1/pow(i,2);
float a;
a=6*total;
float b;
b=pow(a,0.5);
cout<<"圓週率等於"<<b<<endl;
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.66.224.99