Computer Science, asked by raj1099, 1 year ago

smith number program tell me

Answers

Answered by Sumitrao345
1
1.  666

Prime factors are 2, 3, 3, and 37
Sum of the digits are (6+6+6) = 18
Sum of the digits of the factors (2+3+3+(3+7)) = 18

2.   4937775

Prime factors are 3, 5, 5, 65837
Sum of the digits are (4+9+3+7+7+7+5) = 42
Sum of the digits of the factors (3+5+5+(6+5+8+3+7)) = 42

Write a program to input a number and display whether the number is a Smith number or not.

Sample data:

Input             94          Output             SMITH Number

Input             102        Output             NOT SMITH Number

Input             666        Output             SMITH Number

Input             999        Output             NOT SMITH Number

Similar questions