• + 0 comments

    C# solution:

    public static int findDigits(int n)
    {
        int divisors = 0;
        int test = n % 10;
        int remainder = n;
        while (remainder > 0)
        {
            if (test != 0)
            {
                if (n % test == 0)
                {
                    divisors++;
                }
            }
            remainder /= 10;
            test = remainder % 10;
        }
        return divisors;
    }