I have a problem set which we have to read in large integers from a file and multiply them, but the numbers can't be int because they are too big so we have to read them in character by character and create a convert function and multiply function.
Anyways, he writes here:
Each integer is represented as an array of digits, where the least significant digit is storedin index 0, and the last index stores a non-zero number. (The only exception to this is 0,
which is stored in an array of size 1 that has a single element storing 0.) For instance, the
value 1234567890 would be stored as:
index 0- 0
index 1- 9
index 2- 8
index 3- 7
index 4- 6
index 5- 5
index 6- 4
index 7- 3
index 8- 2
index 9- 1
Note: Although this seems counter-intuitive, it makes the code slightly easier, because in
all standard mathematical operations, we start with the least significant digit. It also
makes sense that the digit at the place 10i is stored in index i.
Can someone explain what he means here?
Also, I hate to ask but can someone explain to me what steps it takes to do this problem, I attached the problem if you are interested. The professor didn't teach the way to solve a problem like this. Please note, I am not looking for the answer, just someone with more experience to explain to me.Thanks