#include<stdio.h>
#include<math.h>
int main()
{
int s=1;
double sum=1,n,m;
for(n=2;n<=100;)
{
s=(-1)*s;
m=s/n;
sum=sum+m;
n++;
}
printf("%f\n",sum);
return 0;
}
#include<stdio.h>
#include<math.h>
int main()
{
int s=1;
double sum=1,n,m;
for(n=2;n<=100;)
{
s=(-1)*s;
m=s/n;
sum=sum+m;
n++;
}
printf("%f\n",sum);
return 0;
}