| ||||||||||
| 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:大哥大姐请帮我改一下这个程序。谢谢!1003题。In Reply To:大哥大姐请帮我改一下这个程序。谢谢!1003题。 Posted by:90301316 at 2003-12-09 21:15:15 > #include <stdio.h>
> #include <math.h>
> void main() {
> float s=0;
> float i;
> float e;
> int n=1;
> scanf("%f\n",&e);
> while (e!=0.00) {
> for (i=2;;i++) {
> s=s+1/i;
> if (s>=e) break;
> }
> printf("%.0f card(s)\n",i-1);
> scanf("%f\n",&e);
> n++;
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator