| ||||||||||
| 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:sung at 2007-04-17 21:05:44 > 新手初来报道,请各位指点指点~~
> 在机子上运行时,总是看不到输出~~
> #include <stdio.h>
> void main(){
>
> float c,sum;
> int n;
>
> scanf("%f",&c);
> while (c >= 0.01 && c <= 5.20)
> {
> for (n = 1, sum = 0; sum < c; n++)
> {
> sum = sum + 1/(n+1);
> }
>
> printf("%d\n",n);
>
> scanf("%f",&c);
>
> }
>
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator