• + 0 comments
    int dividers = 0 ; 
            int digit = 0 ;
            int originalNumber =n;
            try{    
                while(n != 0){
                    digit = n % 10;
                    if(digit != 0 &&originalNumber%digit==0)
                        dividers++;
                    n = n/10;
                }
                
            }catch(Exception exception){
                System.out.println(exception);
            }
            return dividers;