I'm suppose to write a program to compute the value of the infinite series 1+1/2+1/3+1/4+1/5.......

here is what I have so far, but of course it doesn't work

#include<stdio.h>

#include<math.h>

double sum_up(epsilon)

double epsilon;

{

int i,sum;

double oldvalue;

sum=0.0;

oldvalue=epsilon+1;

for (i=0; sum_oldvalue> epsilon; i++)

{

oldvalue = sum;

sum += 1/i;

return 0;

}

}