#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<ctype.h>
float fun1(int k)
{
if (k!=0)
{
return(k+fun1(k-1));
}
else
{
return 0;
}
}
int main()
{
int i,n;
float s=0,result=0;
printf ("Please enter N:\n");
scanf ("%d",&n);
for ( i = 1; i<=n; i++)
{
s=1/fun1(i);
result=result+s;
}
printf ("the result is: %f \n", result);
system("pause");
return 0;
}