Help

Hello i want to sum digits in int can you help me?
ok here is example: i have 6 digit number 123456 i want to sum 123 and 456 i want first 3 digits sum and last 3 digits sum.
In an integer number, to get the first n digits on the left you can divide the number for the proper power of 10.
To get the n digits on the right you can use the modulo division, again by the proper power of ten.
Topic archived. No new replies allowed.