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 taozifish at 2011-01-16 18:24:21 on Problem 1517
#include<iostream>
using namespace std;
int main()
{
	int i;
	double s=2.5,t,m;
	cout<<"n e"<<endl;
	cout<<"- -----------"<<endl;
	cout<<"0 1"<<endl<<"1 2"<<endl<<"2 2.5"<<endl;
	for(i=3;i<10;i++)
	{
		m=1;
		for(t=i;t>0;t--)
			m/=t;
		s+=m;
		printf("%d %.9f\n",i,s);
	}
	return 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