SHARE
TWEET

Untitled

a guest Feb 14th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.  
  6.         System.out.println("Enter a number");
  7.  
  8.         Scanner scanner = new Scanner(System.in);
  9.         double number = scanner.nextDouble();
  10.  
  11.         System.out.println( number % 2 == 0 ?
  12.                 "The entered number is even" :
  13.                 "The entered number is odd ");
  14.  
  15.     System.exit(0);
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top