I write this code for show fibonacci series using recursion.But It not show correctly for n>43 (ex: for n=100 show:-980107325).
#include #inc
Keep in mind that the n-th fibonacci number is (approximately) ((1 + sqrt(5))/2)^n.
((1 + sqrt(5))/2)^n
This allows you to get the value for n that allows the result to fit in 32 /64 unsigned integers. For signed remember that you lose one bit.