Pelles C forum

C language => Beginner questions => Topic started by: kiki on February 29, 2008, 04:05:00 PM

Title: PLEASE HELP
Post by: kiki on February 29, 2008, 04:05:00 PM
Hello!!!
I am supposed to write a program that computes the partial sum of harmonic series.  I have no clue on how to start this question neither what it is suppose to print.   

Thank you 

QUESTION:
Write a program to compute the partial sum of harmonic series
1 + 1/2 + 1/3 + L + 1/n
and display the intermediate partial sums. Hint: Use a for loop.
Title: Re: PLEASE HELP
Post by: DMac on February 29, 2008, 05:48:45 PM
Here is a link that will get you off to a good start on your journey of discovery.
http://www.math.utah.edu/~carlson/c/cbook.pdf (http://www.math.utah.edu/~carlson/c/cbook.pdf)

--DMac

It is the glory of God to conceal a thing: but the honour of kings is to search out a matter. (Pr 25:2)
Title: Re: PLEASE HELP
Post by: severach on February 29, 2008, 06:24:58 PM
neither what it is suppose to print.   
This tells me you might need to study up on Harmonic Series Sums (http://en.wikipedia.org/wiki/Harmonic_series_(mathematics)). Once you get that the coding looks trivial.