[noip2002pj] 级数求和

题目链接

题解:写几道水题题解……

#include
using namespace std;
int main()
{
    double S = 0;
    int k,i = 1;
    cin>>k;
    while(S<=k);
    {
        S += (1.0)/i;
        i++;
    }
    cout<return 0;
}

你可能感兴趣的:(不知道是啥)