Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Scanner L = new Scanner(System.in);
  2.  
  3. System.out.println("Ay yo What's your address g?");
  4. String Address = L.nextLine();
  5.  
  6. int Location = Address.indexOf(' ');
  7. String numbers = Address.substring(0, Location);
  8.  
  9. System.out.println("Numbers are: " + numbers);
  10. int OddEven = Integer.parseInt(numbers);
  11.  
  12. if (OddEven % 2 == 0) {
  13. System.out.println("House is on the Left fam");
  14. } else {
  15. System.out.println("House is on the Right fam");
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement