Function to find the digits
def findDigits ( n ) : NEW_LINE INDENT count = 0 NEW_LINE while ( n != 0 ) : NEW_LINE INDENT digit [ count ] = n % 10 ; NEW_LINE n = n // 10 ; NEW_LINE count += 1 NEW_LINE DEDENT return count NEW_LINE DEDENT