Check Number is even or odd Project in java.

 Check Number is even or odd Project in java.





Copy The Below Code And Paste in IDE To see the result.


import java.util.*; class Test { public static void main(String[] args) { Scanner s = new Scanner(System.in); int choice = 1; while (choice == 1) { int a; System.out.println("Enter a number to check odd or even"); a = s.nextInt(); if (a % 2 == 0) { System.out.println("Your number is even"); } else { System.out.println("Your number is odd"); } System.out.println("Want to check more 1 for yes 0 for no"); choice = s.nextInt(); } System.out.println("I hope you checked all your numbers."); }


}



Hope It works For You. Any Queries Do Contact us and for recommend anything for us. 

Thank You 😀



Comments

Popular posts from this blog

Percentage Calculator Project In Java Easy and Simple.