X

DAYS

:

HOUR

:

MINS

:

SEC

Harshad Number

Write a Program in java to enter a number and check number is multiple harshad or not. A multiple harshad is said to be when divided by the sum of its digits, produces another Harshad Number.

Sample input: 6804

Ans: 6+8+0+4=18=>6804/18=378

378=> 3+7+8=18=>378/18=21

21=> 2+1=3=>21/3=7

Author: Manjot Singh 4
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer