You are wrong. Programming languages use certain types of data to store data. Often often a data type cannot contain large data values. Therefore, you need to modify your code to include these large data values.
For example, if you print Fibonacci numbers using C, then you have simple code like
long int first,second,third; first=1; second=1; ct=0; while(ct < Limit) { third=first + second; first = second; second = third; printf("\n%d",third); ct++; }
This code is correct, but you will get incorrect results for Fibonacci numbers> 2 32 (happens if Limit very large), since int and long int are 4 bytes (32 bits) in C.
Thus, your correct algorithm fails due to a lack of data type in C. For the solution, you need to implement your own data structure.
source share