SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package StartWeek;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class EvenOrOddScanner {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         Scanner Keyboard = new Scanner(System.in);
  10.  
  11.         System.out.println("choose aNumber");
  12.  
  13.         int aNumber = Keyboard.nextInt();
  14.         int bNumber = 2;
  15.         int modulus = aNumber % bNumber;
  16.  
  17.         System.out.println("is aNumber odd or even");
  18.         System.out.println("if number 0 is printed aNumber is even");
  19.         System.out.println("is number 1 is printend aNumber is odd");
  20.         System.out.println(modulus);
  21.  
  22.  
  23.     }
  24.  
  25. }
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