@@ -0,0 +1,416 @@
+package leetcode;%0A%0Apublic class Problem258 %7B%0A    public int addDigits(int num) %7B%0A        int n = num;%0A        String s = Integer.toString(n);%0A        while (s.length() != 1) %7B%0A            n = 0;%0A            for (char c : s.toCharArray()) %7B%0A                int i = Integer.parseInt(Character.toString(c));%0A                n += i;%0A            %7D%0A            s = Integer.toString(n);%0A        %7D%0A        return n;%0A    %7D%0A%7D%0A

Solve problem 258