| ||||||||||
| 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 | |||||||||
scanf("%2f",&c); ==> scanf("%f",&c);In Reply To:郁闷!哪位兄弟帮忙看一下错在哪儿? Posted by:cugwei at 2004-04-23 16:03:24 > #include<math.h>
> main()
> {int i=3,N=2;
> float sum=0.5,c;
> scanf("%2f",&c);
> while(c>=0.01&&c<=5.20&&c!0.00)
> /*上面可能有问题,因为我在本地测试时,输入0.01无法出现答案,但我不确定*/
> {while(c>sum)
> {sum+=(float)1/i;
> i++;
> N++;
> }
> printf("%d card(s)\n",N-1);
> break;
> }
> }
> 很郁闷啊!一直报错!
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator