I’m trying to subtract strings where each ASCII character is treated as a decimal digit. For instance:
"1000000000001" - "0100000000001" = "900000000000"
How would I get started on an implementation of this if my function prototype looked like:
char* get_sub(char* a, char* b)
It doesn’t seems, but it’s a quite complex problem (unless I’m getting too much old).
This works only in
N. So it must be true thata >= 0, b >= 0, a >= b. I won’t explain how does it works. As I’ve written, it’s quite complex 🙂 (and I’m not even happy of what I’ve written. I’m sure there is something I haven’t thought)