Originally Posted by
Salem
If you type in
13579
I can see that you might store 5 in x[0] representing the length, but what would you store in x[1]?
Would it be '1', the first digit of input?
Would it be '9', the least significant value of the input?
> how to divide the input integer into digits
It's a lot easier if you read it as a string, expecially if you're considering very long input.
The rest is just modelling how you would add two numbers on paper
- start at the right, and add with carry your way to the left.