How to read specific digit of an INT variable?
Posted: Thu May 07, 2015 7:50 am
How would one best go about this problem?
Let's say INT_var = 12345
Now how do I take that and turn it into this:
These are all byte variables.
Digit0 = 5
Digit1 = 4
Digit2 = 3
Digit3 = 2
Digit4 = 1
Let's say INT_var = 12345
Now how do I take that and turn it into this:
These are all byte variables.
Digit0 = 5
Digit1 = 4
Digit2 = 3
Digit3 = 2
Digit4 = 1