Advertisement
Ferix

RSOJava#4

Nov 25th, 2020
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class MyClass {
  4.     public static void main(String args[]) {
  5.        
  6.         Scanner input = new Scanner(System.in);
  7.        
  8.         int inputN = input.nextInt();
  9.        
  10.         if(inputN % 2 == 0){
  11.             System.out.println("The number "+inputN+" is even!");
  12.         }else{
  13.             System.out.println("The number "+inputN+" is odd!");
  14.         }
  15.    
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement