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

各位大哥!我的程序错在哪啊?为什么wrong answer啊?

Posted by yiyiyi4321 at 2005-07-25 13:37:27 on Problem 1517
#include<stdio.h>
main()
{int n;
 long sum;
 double c,e=0.0;
 printf("\nn e\n");
 printf("- -----------\n");
 for(n=0;n<=9;n++)
 {if(n==0)sum=1;
  else sum*=n;
  c=1.0/sum;
  e+=c;
  if(n<9)printf("%d %.10g\n",n,e);
  else printf("%d %.10g",n,e);
 }
}

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