#include<stdio.h>
int main()
{
int i;
double sum,k=1;
for(i=1,sum=0;i<=100;i++)
{
sum+=k/i;
k*=-1;
}
printf("%lf\n",sum);
getchar();
return 0;
}
#include<stdio.h>
int main()
{
int i;
double sum,k=1;
for(i=1,sum=0;i<=100;i++)
{
sum+=k/i;
k*=-1;
}
printf("%lf\n",sum);
getchar();
return 0;
}