@[王路洋](/space/show?uid=170076)
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
double c=2,b=0,l=0,z;
cin>>z;
while(l<z)
{
b++;
l=l+c;
c=c*1.0/100.0*98;
// cout<<l<<" "<<c<<endl;
}
cout<<b;
return 0;
}
```
你的`i`初值应该是0
by ⚡GG⚡ @ 2019-02-23 15:32:34
@[垃圾一个](/space/show?uid=85933) 哥,你写的代码我一点都看不懂!!!我才刚刚学C语言程序设计,能不能以我的方法改一下。拜托了!!!
by 王路洋 @ 2019-02-24 10:18:22
@[王路洋](/space/show?uid=170076) 你只要知道,i是从0开始加的,你可以手推一下!
by ⚡GG⚡ @ 2019-02-24 15:19:39