#include "stdio.h"
#include "math.h"//
void main(void){
int n,i;
double x=1,y=2,temp,sum=1,fleg=1;
printf("Type an integer...\nn=");
scanf("%d",&n);
for(i=1;i
x=y;
y=temp+x;
fleg*=-1;
sum+=x/y*fleg;
}
printf("%g\n",sum);
}
int sum=1;
double num;
signed int flag;
for(i=2;i
num=i/(2*i-1);
sum+=(flag*num);
}
printf ("%d",sum);