Write a java program to find whether a number entered by the user is a mystic number or not
A mystic number is a number whose sum of the digits is 3.For example, 552 is a mystic number. 5+5+2=12, 1+2=3
Answers
Answered by
0
Answer:
A number is said to be a magic number, if the sum of its digits are calculated till a single digit recursively by adding the sum of the digits after every addition. If the single digit comes out to be 1,then the number is a magic number.
Similar questions