answersLogoWhite

0


Best Answer

class neonn

{

; public static void check()throws IOException

; {

; BufferedReader br = new BufferedReader ( new InputStreamReader(System.in));

; int num;

; System.out.println("Enter the number to be checked!");

; num=Integer.parseInt(br.readLine());

; int square;

; square=num*num; //squaring the number

;

; int sum=0;

;

; String sqs=Integer.toString(square);

; for(int i=0; i<sqs.length(); i++)

; sum+=Integer.parseInt(sqs.substring ( i,i+1 ) ) ;

;

; if (sum==num) //checking if the sum of the square is equal to the number entered

; System.out.println(num+" is a Neon Number!"); // if yes. It is neon

; else

; System.out.println(num+" is not a Neon number!"); //otherwise not

;

; }

;

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

jhgeshrdcjyugbln;p;/.edfgh.j;7ly

]

't;lefgjokpl

"/;tghioi

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a program in java to check a number is neon number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can we add website link when we write java program?

yes ,i can add the website link in java program when we write.


How do you write a java program to find the square root of a number?

You can use the Math.sqrt() method.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Write a java program to check a number is Armstrong number?

import java.io.*; public class Jerry { public static void main(String as[]) throws IOException { int k=Integer.parseInt(as[0]); int n=k; int d=0,s=0; while(n&gt;0) { d=n%10; s=s+(d*d*d); n=n/10; } if(k==s) System.out.println("Armstrong number"); else System.out.println("not Armstrong number"); } }


What is javadoc?

write a java program to display "Welcome Java" and list its execution steps.


How write new line program in java?

\n


Write a Java Program to find occurences of given word in a text?

Check the documentation of the String class, for a method that searches for a substring.


How do you write a program using function that counts the number of vowels in a string in java language?

Use text-editor notepad++


Write a statementin a java program to read 2 integers and dispay the number of interagers between them?

a=153 a=n%10;


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.


How java is 100 percent Internet based?

It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.It isn't. It can also be used to write desktop applications. Java does have many options to program for the Internet, but that is not the only possibility.


Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java