You are viewing a single comment's thread. Return to all comments →
C#:
public static int superDigit(string n, int k) { do { long sum = 0; foreach(char c in n) { sum += int.Parse(c.ToString()); } sum *= k; k=1; n = sum.ToString(); }while(n.Count()!=1); return int.Parse(n); }
Seems like cookies are disabled on this browser, please enable them to open this website
Recursive Digit Sum
You are viewing a single comment's thread. Return to all comments →
C#: