I want to count the sum of digits in odd places and in even places , and after that their difference
we know that first digit it's from the right side
How can I do it with switch?
For example :
A number 23543 :
sum of digits in even places:7 (3+4=7 even places)
sum of digits in odd places:10 ( 2+5+3=10 odd places)
difference: -3 (7-10)