Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
各位大哥!我的程序错在哪啊?为什么wrong answer啊?#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator