作者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