print fibo big numbers in c++ or c language

后端 未结 6 1227
夕颜
夕颜 2021-01-16 23:39

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         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-16 23:57

    For this purporse you need implement BigInteger. There is no such build-in support in current c++. You can view few advises on stack overflow

    Or you also can use some libs like GMP

    Also here is some implementation:

    1. E-maxx - on Russian language description.

    2. Or find some open implementation on GitHub

提交回复
热议问题