fibonacci series - recursive summation
问题 Ok, I initially wrote a simple code to return the Fibonacci number from the series based on the user input.. n=5 will produce 3.. static int fibonacci(int n) { if (n == 1) return 0; else if (n == 2) return 1; else return (fibonacci(n - 1) + fibonacci(n - 2)); } I was thinking of modifying the code to return the sum of the series rather than just returning the value from the series and while trying to do the sum I accidentally added 1 to the return statement and to my surprise, it returned the