| ||||||||||
| 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:都改成DOUBLE试试In Reply To:大家谁有能力帮我呀? Posted by:piaofushi919 at 2004-12-09 21:48:32 > #include <stdio.h>
> #include <math.h>
> void main()
> {
> float a,sum;
> int n;
> scanf("%f",&a);
> while (a!=-1){
> sum=0;
> for(n=2;sum<a;n++){
> sum+=(float)1/n;
> }
> printf("%d card(s)\n",n-2);
> scanf("%d",&a);
> }
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator