write a Java program to print all magic numbers from 10 to 100
Answers
Answered by
0
Answer:
A Magic number is a number whose sum of its digits are calculated till a single digit is ... 1 + 9 = 10 // 10 is not a single digit number, continue adding digits ... List of Magic numbers from 1 to 100 are : 1, 10
Answered by
0
Explanation:
Enter any number : 145.
145 is a Magic number. Another way of checking whether a given number is Magic number or not is given below.
import java.util.*; public class JavaHungry { public static void main(String args[]) { System. out. println("Enter any number : "); Scanner scan = new Scanner(System.
Similar questions
Math,
5 months ago
Accountancy,
5 months ago
Biology,
5 months ago
Science,
10 months ago
Social Sciences,
10 months ago
Physics,
1 year ago
Science,
1 year ago