#include<stdio.h>//header file
#include<conio.h>//header file
void main() //starting of the main() function
{
int i,n,c; //declaration of the variables
float s=0.0;
clrscr();
printf("program that calculates the sum of reciprocral of odd nos.");
printf("\n\n\n\t\t------------INPUT-------------");
printf("\n\nenter the range");//taking input from the user
scanf("%d",&n);
c=(2*n)-1;
for(i=1;i<=c;i=i+2)
s=s+(1.0/i);
printf("\n\n\n\t\t------------OUTPUT------------");
printf("\n\nthe sum of the reciprocal of odd nos.=%f",s);//printing output
getch();
}