Zuckerman Numbers | Java implementation to check if N is a Zuckerman number ; Function to get product of digits ; Function to check if N is an Zuckerman number ; Driver code
class GFG { static int getProduct ( int n ) { int product = 1 ; while ( n != 0 ) { product = product * ( n % 10 ) ; n = n / 10 ; } return product ; } static boolean isZuckerman ( int n ) { return n % getProduct ( n ) == 0 ; } public static void main ( String [ ] args ) { int n = 115 ; if ( isZuckerman ( n ) ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } }