[公告] 給團長的C++
因為他被0名1給虎濫了....
囧暴了!
#include <C:\devcpp\all.h>
int main()
{
int i, j;
srand((unsigned)time(NULL));
double P = 1.0;
for( double x=1000; x>=1; x=x-1)
{ P = x + x/P;
}
cout.setf(ios::fixed);
cout.precision(6);
cout << 2.0 + 1.0/P << endl;
cin.get();
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.136.165.155
推
11/23 10:47, , 1F
11/23 10:47, 1F
→
11/23 10:50, , 2F
11/23 10:50, 2F
推
11/23 10:52, , 3F
11/23 10:52, 3F
推
11/23 10:54, , 4F
11/23 10:54, 4F
推
11/23 10:55, , 5F
11/23 10:55, 5F
→
11/23 11:18, , 6F
11/23 11:18, 6F
推
11/23 11:38, , 7F
11/23 11:38, 7F
推
11/23 11:43, , 8F
11/23 11:43, 8F
推
11/24 00:37, , 9F
11/24 00:37, 9F