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