@@ -0,0 +1,1105 @@
+package ru.agolovin;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0A%0Apublic class UserInput implements Runnable %7B%0A%0A    private int maxFloor;%0A    private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A%0A    @Override%0A    public void run() %7B%0A        ask(%22S%22);%0A    %7D%0A%0A    public int ask(String s) %7B%0A        boolean flag = false;%0A        int level = -1;%0A        System.out.println(s);%0A        do %7B%0A            try %7B%0A                String line = reader.readLine();%0A                try %7B%0A                    level = Integer.parseInt(line);%0A                %7D catch (NumberFormatException e) %7B%0A                    System.out.println(%22%D0%9E%D1%88%D0%B8%D0%B1%D0%BA%D0%B0 %D0%B2%D0%B2%D0%BE%D0%B4%D0%B0%22);%0A                    continue;%0A                %7D%0A                if (level %3E 0 && level %3C= maxFloor) %7B%0A                    flag = true;%0A                %7D else %7B%0A                    System.out.println(%22%D0%9D%D0%B5%D1%81%D1%83%D1%89%D0%B5%D1%81%D1%82%D1%83%D1%8E%D1%89%D0%B8%D0%B9 %D1%8D%D1%82%D0%B0%D0%B6%22);%0A                %7D%0A            %7D catch (IOException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D while (flag);%0A        return level;%0A    %7D%0A%0A%0A%7D%0A

add additional test task in part6 chapter7 package2