Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

搞不明白怎么错了

Posted by yi_chen2 at 2007-05-22 12:30:05 on Problem 1517
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator