#include<stdio.h>//1-1/2+1/3-...-1/00//
void main()
{
double fm=1,s=0;
int fh=1,fz=1;
for(;fm<=100;fm++)
{
fz=fh*fz;
s=s+fz/fm;
fh=-fh;
}
printf("s=%lf\n",s);
}
#include<stdio.h>//1-1/2+1/3-...-1/00//
void main()
{
double fm=1,s=0;
int fh=1,fz=1;
for(;fm<=100;fm++)
{
fz=fh*fz;
s=s+fz/fm;
fh=-fh;
}
printf("s=%lf\n",s);
}