0
Something like this would do it. int sum = 0; for (int i = 1; i < n; i++) { int m = 1; for (int j = 0; j < i; j++) { m *= x; } sum += m/i; } Is there still a need for it to be recursive?
4th Jan 2017, 4:34 PM
Abhilash Kumar Vedwan
Abhilash Kumar Vedwan - avatar