Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. @SuppressWarnings("empty-statement")
  2. public static void main(String[] args) {
  3. System.out.println("Hi and welcome to Green Lawn Properties please input the following!");
  4. Scanner olivier = new Scanner(System.in);
  5. System.out.println("What's the building number?");
  6. int building = olivier.nextInt();
  7. if ((building <= 0) || (building >= 16)) {
  8. System.out.println("Error 404 wrong building #.");
  9. return;
  10. }
  11. System.out.println("What's the apartment number?");
  12. int apartment = olivier.nextInt();
  13. if ((apartment <= 100) || (apartment >= 1513));
  14. {
  15.  
  16. System.out.println("Error 404 wrong apartment #.");
  17. return;
  18. }
  19. System.out.println("What's the month number?");
  20. int month = olivier.nextInt();
  21. if ((month < 0) || (month > 12)) {
  22. System.out.println("Error 404 wrong month #.");
  23. return;
  24. }
  25. System.out.println("What is your floor number?");
  26. int floor = olivier.nextInt();
  27. if ((floor < 0) || (floor > 4)) {
  28. System.out.println("Error 404 wrong floor #.");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement