Write a menu driven program a) To accept a number and check the number is a Harshad number or not. A number is said to be the Harshad number if it is divisible by the sum of its digit. For example, if number is 156, then sum of its digit will be 1 + 5 + 6 = 12. Since 156 is divisible by 12. So, 156 is a Harshad number. Some of the other examples of Harshad number are 8, 54, 120, etc. b) To accept a number and check the number is perfect or not. If the sum of its positive divisors excluding the number itself is equal to that number is a perfect number. For e.g. 28 is a perfect number because 28 is divisible by 1+2+4+7+14=28
Answers
Answered by
0
Please find the attached photo.
The code is in python language.
Attachments:

Similar questions
Chemistry,
6 months ago
English,
6 months ago
Biology,
1 year ago
Math,
1 year ago
Environmental Sciences,
1 year ago