Problem solving with programming: Adding a list of big numbers
Most of the popular programming languages like C/C++, Java, C# provide primitive data types (int, long) to hold values up to only a specific range.
A 64-bit integer can store only store numbers in the range of -264 to 263-1. This can store numbers containing roughly 19-20 digits.
What if we have to deal with even bigger numbers.
For example, numbers such as 1298372305835723862093487348
We have to implement our own methods to do arithmetic on such numbers. Just like the following we do for addition.
Read full article from Problem solving with programming: Adding a list of big numbers
No comments:
Post a Comment