Problem 57502. Determine if input is a Harshad number
In mathematics a harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digits when written in that base.
Example: 2023 is a harshad number because 2023 / (2+0+2+3) = 289
Assume all numbers in this problem are in 10 base
Solution Stats
Problem Comments
-
1 Comment
Dyuman Joshi
on 3 Jan 2023
This problem looks like a subset of #55035 - B-Harshad Numbers
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
Project Euler: Problem 3, Largest prime factor
1785 Solvers
-
1462 Solvers
-
Check that number is whole number
5183 Solvers
-
Matlab Basics - y as a function of x
525 Solvers
-
There are 10 types of people in the world
1277 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!