Hi, I have this Java problem and I don't completely understand what it means, this is the problem:
Write a function named sumTo() that takes an integer parameter n and that returns the sum of the first n reciprocals. In other words:
sumTo(n) returns (1 + 1/2 + 1/3 + 1/4 + ... + 1/n)
(of course, 1/2 in this case means .5) For example, sumTo(2) should return the value 1.5 (1 + 1/2). If sumTo() is passed the value 0, it should return 0.0 as its result. You may assume that sumTo() is never passed a negative value.