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 |
Re:我做的CIn Reply To:我做的C Posted by:shutle at 2004-09-08 15:19:39 > void main() > { > float a,result=0; > int n = 2; > scanf("%f",&a); > while(a!=0) > { > for (n=2,result=0; result<a; n++) > { > result += (float)1 / n; > } > printf("%d card(s)\n",n-2); > scanf("%f",&a); > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator