精華區beta NTUBIME96-HW 關於我們 聯絡資訊
#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