/*
*  C program to determine and print the sum of the following harmonic series for
*  a given value of n: 1 + 1/3 + 1/5 + ... +1/(2n+1)
*/
#include<stdio.h>

void main()
{
int n;
float i, sum, t;
printf("1 + 1/3 + 1/5 + ... + 1/(2n+1)\n");
n=25;
sum=0;
for(i=0; i<=n; i++)
{
t=1/(2*i+1);
sum=sum+t;
}
printf("%f",sum);
}