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

help!!!wa了一天了!!!1517题

Posted by gxiverson at 2004-12-29 19:23:54
#include<iostream.h>
#include<iomanip.h>
#include<math.h>
double a(int n)
{    
double m=1.00;
double j=1.00;
	for(int i=1;i<=n;i++)
	{ j*=i;
  m+=1/j;
	}
	return m;
}
void main()
{
cout<<"n e"<<endl<<"- -----------"<<endl;
for(int i=0;i<=9;i++)
cout<<i<<" "<<setprecision(10)<<a(i)<<endl;

}

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