Write a method called fractionSum that accepts an integer parameter n and returns as a double the
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a method called fractionSum that accepts an integer parameter n and returns as a double the sum of the first n terms of the sequence: fraction sum equation In other words, the method should generate the following sequence: 1 + (1/2) + (1/3) + (1/4) + (1/5) + ... You may assume that the parameter n is non-negative.
Related Book For
Mathematical Applications for the Management, Life and Social Sciences
ISBN: 9781337625340
12th edition
Authors: Ronald J. Harshbarger, James J. Reynolds
Posted Date: