Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("empty-statement")
- public static void main(String[] args) {
- System.out.println("Hi and welcome to Green Lawn Properties please input the following!");
- Scanner olivier = new Scanner(System.in);
- System.out.println("What's the building number?");
- int building = olivier.nextInt();
- if ((building <= 0) || (building >= 16)) {
- System.out.println("Error 404 wrong building #.");
- return;
- }
- System.out.println("What's the apartment number?");
- int apartment = olivier.nextInt();
- if ((apartment <= 100) || (apartment >= 1513));
- {
- System.out.println("Error 404 wrong apartment #.");
- return;
- }
- System.out.println("What's the month number?");
- int month = olivier.nextInt();
- if ((month < 0) || (month > 12)) {
- System.out.println("Error 404 wrong month #.");
- return;
- }
- System.out.println("What is your floor number?");
- int floor = olivier.nextInt();
- if ((floor < 0) || (floor > 4)) {
- System.out.println("Error 404 wrong floor #.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement