deyanivanov966

03. Even or Odd

Aug 21st, 2020 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.util.Scanner;
  3.  
  4. public class EvenorOdd {
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.  
  8.         int A = Integer.parseInt(scanner.nextLine());
  9.  
  10.         if ( A%2 ==0){
  11.             System.out.println("even");
  12.         }else{
  13.             System.out.println("odd");
  14.         }
  15.  
  16.  
  17.     }
  18. }
Add Comment
Please, Sign In to add comment