| ||||||||||
| 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 | |||||||||
Re:搞不明白怎么错了In Reply To:搞不明白怎么错了 Posted by:yi_chen2 at 2007-05-22 12:30:05 > #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