even odd

package nambers; public class nambers { public static void main(String[] args){ System.out.println("hello"); int n1=20; double n= (double)n1; n= Math.abs(n); while(n!=1.0&n!=2.0&n!=0){ n=n-2; System.out.println(n); } if (n==2){ System.out.println("number is odd "); } if (n==1){ System.out.println("number is even"); } if(n==0){ System.out.println("null"); } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.