The only line of input contains a single integer N.
Print first even sum and then odd sum separated by space.
0 <= N <= 10^8
First, initialize two variables, one as evenSum=0, and the other oddSum=0. Then, For the given input n iterate till n > 0. To get the last digit do, last = n % 10. If your last is even add it to evenSum else add it to oddSum. Now update n as n = n/10.
Finally, print out the values of the variable evenSum and oddSum.