Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner L = new Scanner(System.in);
- System.out.println("Ay yo What's your address g?");
- String Address = L.nextLine();
- int Location = Address.indexOf(' ');
- String numbers = Address.substring(0, Location);
- System.out.println("Numbers are: " + numbers);
- int OddEven = Integer.parseInt(numbers);
- if (OddEven % 2 == 0) {
- System.out.println("House is on the Left fam");
- } else {
- System.out.println("House is on the Right fam");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement