borkins

03a. Even or Odd

Mar 23rd, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. /*
  2.  * Simple Conditions
  3.  */
  4. import java.util.Scanner;
  5.  
  6. public class _03a_EvenOrOdd
  7. {
  8.     public static void main(String[] args)
  9.     {
  10.         Scanner scan = new Scanner(System.in);
  11.  
  12.         int num = Integer.parseInt(scan.nextLine());
  13.  
  14.         if (num % 2 == 0) {
  15.             System.out.println("even");
  16.         }
  17.         else {
  18.             System.out.println("odd");
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment