Question: Please use C++ Write a RECURSIVE method sumto that accepts an integer parameter n and returns the sum of the first n reciprocals. In other

Please use C++
Write a RECURSIVE method sumto that accepts an integer parameter n and returns the sum of the first n reciprocals. In other words: sumTo(n) returns: 1 + 1/2 + 1/3 + 1/4 + ... + 1 For example, the call of sumTo(2) should return 1.5. The method should return 0.0 if passed the value o The method should throw a string error if passed a value less than 0. Not a cString error Demonstrate that your program/method works by showing 5 examples. (Use a try catch block for one of them so it doesn't crash)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
