top of page
Writer's pictureSatyam Gupta

Magic Composite Number in Java

Updated: Jan 9, 2022

Magic Composite Number


Question : Write a program to accept a number and check whether it is a Magic Composite Number or not.


Magic Composite Number : A Magic Composite Number is a positive integer which is composite as well as a magic number.


First 6 Magic Composite Numbers : 10, 28, 46, 55, 64, 82


Magic Number : A Number is said to be a Magic Number if the sum of its digits are calculated till a single digit is obtained by recursively adding the sum of its digits.

If the single digit comes to be 1 then the number is a Magic Number.


199 = 1 + 9 + 9 = 19 19 = 1 + 9 = 10 10 = 1 + 0 = 1


Composite Number : A composite number is a number that has more than two factors.

 

Program to check whether a number is Magic Composite or not :-

Checkout Source Code : Click here

Program Video : Watch Now




525 views0 comments

Recent Posts

See All

Bình luận


Post: Blog2_Post
bottom of page