| ||||||||||
| 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 | |||||||||
请各位帮我找找错~~拜托!新手初来报道,请各位指点指点~~
在机子上运行时,总是看不到输出~~
#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