Python program to determine whether the given number is a Harshad Number.
If a number is divisible by the sum of its digits, then it will be known as a Harshad Number.
The number 156 is divisible by the sum (12) of its digits (1, 5, 6 ).
Some Harshad numbers are 8, 54, 120, etc.
In this program, integer value is predefined, we don?t need to put integer value to determine whether the given number is a Harshad number or not by following the algorithm as given below:
156 is a harshad number
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week