输入一个浮点数M,求满足1/2+1/3+…+1/n >= M 的最小整数n;
#include<iostream>
#include<cstring>
#include<vector>
#include<cstdio>
#include<algorithm>
using namespace std;
const int MAX = 100001;
int main()
{
double sum,x;
int i;
while(cin>>x&&x!=0.00)
{
sum = 0;
for(i=2;sum<x;i++)
{
sum += 1.0/i;
}
cout<<i-2<<" card(s)"<<endl;
}
return 0;
}