So this is my code so far.
public int getsum (int n){ int num = 23456; int total = 0; while (num != 0) { total += num
int getSum(int N) { int totalN = 0; totalN += (N% 10); N/= 10; if(N == 0) return totalN; else return getSum(N) + totalN; }