int fun(int n)
{
double sum = 0.0;
int k = 1;
for(int i = 1; i <= n; i++)
{
sum += (1.0/double(i))*k;
k = k*(-1);
}
return sum;
}
float Fun(int n)
{
if(n==1) return 1.0f;
int iCoffie = -1;
float fSum = 1.0f;
for(int i=2; i<=n; i++ )
{
fSum += 1/(float)i*powf(-1,i-1);
}
return fSum;
}