I have an n
-digit number, say X
. Now, what-is-the/how-can-I-come-up-with-an equation [or function] that I should use to get the first n/2
-digit number and second n/2
-digit numbers from the n
-digit number?
For example:
X = 1234 ; n = 4 a = 12 (first n/2 digits) b = 34 (second n/2 digits) X = 56789 ; n = 5 a = 567 (first n/2 digits - ceiling) b = 89 (second n/2 digits)