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 |
优化后的程序In Reply To:这都会错?!!怎么可能啊?!! Posted by:ferrettemp at 2005-01-17 23:46:29 #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