import java.util.Scanner; class Even { public static void main() { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); if(a%2=0) { System.out.println("The number is even"); } else { System.out.println("The number is odd"); } } }
Answers
Answered by
4
what to do with this program.........
one mistake is there that you need to write after public static void main that (String args [ ])
After the scanner one line you should write
System.out.println ("Enter the number you want to check");
then you can continue with the rest lines....
rest the program is correct and it is to find whether the number is even or odd
hope this information is the same you wanted otherwise write the whole question......
Similar questions
World Languages,
4 months ago
Science,
4 months ago
Science,
8 months ago
Math,
8 months ago
Math,
1 year ago