For example you have to numbers
num1 = 24454543532465465434345465465656546454
num2 = 97867543532465465434345465465656546454
you can not store these in int or long because of range, so how will you do.
Solution-
1. just store both numbers in Array
2. start sum of elements of array from last
3. if any 'carry' then forward it to previous.
num1 = 24454543532465465434345465465656546454
num2 = 97867543532465465434345465465656546454
you can not store these in int or long because of range, so how will you do.
Solution-
1. just store both numbers in Array
2. start sum of elements of array from last
3. if any 'carry' then forward it to previous.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.