recursive function average(int n)?



Hi everyone,

I was asked this question: write a recursive function average(int n)
returning the average of the series 1..n . IOW, the return is
(1+2+3...+n)/n. No loops, only recursive

any ideas?
thanks!
Lee

.



Relevant Pages