Fibosum question

https://ide.codingblocks.com/s/187446 please look nto the code and suggest changes in code

@sgdon142 Have you checked your compute function

As you know that sum of fib numbers up to n is fib(n+2)-1 . We can use that method to find the sum of Fibonacci upto n and then subtract that from fib(m+2)

can u suggest changes in my code

First if all perform the operation which I told you in the previous comment. Because your formula itself is wrong

bhai changes kar ke mere ide mein save kar do same id par ya dusri id par

I’ve saved the changes on your code.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.