How can I split an int number with out using string, for example for the number 123456 and 2 splits i should print = 12|34|56
for 1234567 and 3 splits I should print = 1|234|567 from right to left Sincerely.
How can I split an int number with out using string, for example for the number 123456 and 2 splits i should print = 12|34|56
for 1234567 and 3 splits I should print = 1|234|567 from right to left Sincerely.
You can use the mod operator with powers of 10 to get remainders
similar question answered here: How to get the separate digits of an int number?