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 |
float改成double就好了In Reply To:优化后的程序 Posted by:ferrettemp at 2005-01-17 23:55:18 > #include <stdio.h> > void main() > { > float xinxi[100000],sum=0; > long i; > for (i=1;i<100000;i++) > { > sum+=1.000000/(2*i); > xinxi[i]=sum; > } > printf("Cards Overhang\n"); > while (scanf("%ld",&i)!=-1) > printf("%5d%10.3f\n",i,xinxi[i]); > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator