You are viewing a single comment's thread. Return to all comments →
C#
public static int findDigits(int n) { string nstr = n.ToString(); int returnNum = 0; foreach (char c in nstr){ int cur = c - '0'; if (cur == 0){ continue; } if (n % cur == 0){ returnNum++; } } return returnNum; }
Seems like cookies are disabled on this browser, please enable them to open this website
Find Digits
You are viewing a single comment's thread. Return to all comments →
C#