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:请指教一下,看错在那里?In Reply To:请指教一下,看错在那里? Posted by:qzmc at 2009-07-20 11:54:55 > #include<stdio.h> void main() { int n=1; double len,x=0; scanf("%lf",&len); while(len) { x+=(1.0/(n+1)); if(x>=len) break; else n++; } printf("%d",n); printf(" card(s)\n"); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator