How can we add too long integers (for example 20 digits) with usage of Strings?
How can we add too long integers (for example 20 digits) with usage of Strings?
I like to use four char arrays:
carry[]
add1[]
add2[]
=====
sum[]
Set each of them up with an initial value of 0 in them, and use them just like you would do it by hand, with a pencil, working from right to left. (so your index decrements, not increments).