#include
using namespace std;
int main()
{
int n = 1,limit;
double sum = 0;
cin >> limit ;
while (sum <= limit)
{
sum += 1/n;
n++;
}
cout << "n=" << n<<"sum="<<sum ;
return 0;
}
猛跑小猪
肥皂起泡泡
相关分类