#includeint main (void){int i,n,m=1;double sum=0.0;printf("Enter a number:");scanf("%d",&n);for(i=1;i<=n;i++){sum=sum+(double)i/(2i-1);m=-m;}printf("sum=%lf\n",sum);return 0;}