+ 4
How can I separate numbers into 2 digits. For example I have 101010 and what I wanna do is 10 10 10
I wanna separate into groups of 2 and I have 101010 and what I wanna do is 10 10 10. How can I do that
1 Antwort
+ 7
Just devide the number by hundred and keep the remainder (using modulo(%) Operator) like this you will be able to get last 2 digits of the number. Do this again and again to split the number in groups of 2
p.s. you have to reduce the original number to its one - hundredth value after every iteration for this to work