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

不知道为什么是ce

Posted by suinadms at 2011-06-26 11:23:24 on Problem 1517
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int plus(int n){
	int j,z=1;
	for (j = 1;j <= n;j++)
	     z= z*j;
    return z;
	}	
int main(){
   int i;
   double e=2.5;
   printf("n e\n");
   printf("- -----------\n");
   printf("0 1\n");
   printf("1 2\n");
   printf("2 2.5\n");
   for (i = 3;i <= 9;i++){
       e += 1.0/plus(i);
	   printf("%d %.9f\n",i,e);
   }
   //system ("pause");
   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