#include<bits/stdc++.h> using namespace std; int main(){ float a=0,b=0,d=0,cnt=0,temp=2; cin>>a; while(d<a){ d=d+temp; temp=0.98*temp; cnt++; } cout<<cnt++; system("pause"); return 0; }
输入100时程序为什么没有反应?