write a program to find the sum of series 1/1 + ½ + 1/3 + 1/n+….
Here is the c source code/program for: write a program to find the sum of series 1/1 + ½ + 1/3 + 1/n+….
/*program to find the sum of series.*/
#include <stdio.h>
#include <conio.h>
void main ()
{
float i,n;
float sum =0;
printf (“enter the terms = “);
scanf (“%f”,&n);
for (i=1;i<=n;i++)
{
sum += 1/i;
}
printf (“sum=%f\n”,sum);
getch();
}








