Advertisement
Fakhru

Odd

Jul 2nd, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package oddeven;
  6. import java.util.Scanner;
  7.  
  8.  
  9. /**
  10.  *
  11.  * @author MPA3
  12.  */
  13. public class Oddeven {
  14.  
  15.     /**
  16.      * @param args the command line arguments
  17.      */
  18.     public static void main(String[] args) {
  19.  
  20.      Scanner input = new Scanner(System.in);
  21.         System.out.println("Enter A Number");
  22.              int num = input.nextInt();
  23.              
  24.              if(num % 2 == 0){
  25.                          System.out.println("This is Even Number");
  26.  
  27.              }else {
  28.                                           System.out.println("This is Odd Number");
  29.  
  30.              }
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement