Computer Science, asked by adchelli, 9 months ago

write a Java program to print all magic numbers from 10 to 100

Answers

Answered by RishiAEC
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 smartyaryan143
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