输入格式:
Enter a positive integer n.
输出格式:
Output the value of the partial sum, retaining three decimal places.
#include
#include
using namespace std;
int main ()
{
int n,i=1,x=1,y=1;
float sum;
cin>>n;
while (i<=n)
{
sum+=i/(x*y*1.0);
i++;
x=-x;
y=y+2;
}
cout<
}



