| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
搞不明白怎么错了#include<iostream.h>
#include<iomanip.h>
long double main(void)
{
long double k=1.0;
long double e[10]={1.0};
for(int i=0;i<10;i++)
{
k*=i+1;
e[i+1]=e[i]+1/k;
};
cout<<"n "<<"e"<<endl;
cout<<"- -----------"<<endl;
for(i=0;i<10;i++)
cout<<i<<" "<<setprecision(10)<<e[i]<<endl;
return 0.0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator