Given a number, we have to check that the entered number is Harshad Number or not.
A number is said to be Harshad Number if and only if the sum of entered number completely divides the entered number (into 10 bases).
Example:
Input: 18
Sum = 1 + 8
Now, 18 are dividing by 9 completely.
Program to check whether the given number is Harshad Number or not in Java
Output
need an explanation for this answer? contact us directly to get an explanation for this answer