Computer Science, asked by jerefreddy, 2 months ago

Write a java program to find neon numbers from 9 to 10000​

Answers

Answered by Anonymous
1

\mathcal{Neon \:Number}

  • A neon number is a number where the sum of digits of square of the number is equal to the number. The task is to check and print neon numbers in a range.

Examples:

Steps

  • Input : 9
  • Output : Neon Number
  • Explanation: square is 9*9 = 81 and
  • sum of the digits of the square is 9.

  • Input :12
  • Output : Not a Neon Number
  • Explanation: square is 12*12 = 144 and
  • sum of the digits of the square is 9 (1
  • + 4 + 4) which is not equal to 12.

\red{Recommended:}

  • Please try your approach on {IDE} first, before moving on to the solution.
  • The implementation is simple, we first compute square of given number, the find sum of digits in the square.

refer \:to \:Attatchment✔✔

\huge\mathcal{Output:-19}

Attachments:
Similar questions