aneliabogeva

Working hours

Nov 10th, 2020
44
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. import java.util.function.DoubleBinaryOperator;
  3.  
  4. public class BiggerNumber {
  5. public static void main(String[] args) {
  6. Scanner scanner = new Scanner(System.in);
  7. int hour = Integer.parseInt(scanner.nextLine());
  8. String day = scanner.nextLine();
  9.  
  10. if(hour >= 10 && hour < 18){
  11. switch (day){
  12. case "Monday":
  13. case "Tuesday":
  14. case "Wednesday":
  15. case "Thursday":
  16. case "Friday":
  17. case "Saturday":
  18. System.out.println("open");
  19. break;
  20. default:
  21. System.out.println("closed");
  22. }
  23. }else{
  24. System.out.println("closed");
  25. }
  26. }
  27. }
  28.  
RAW Paste Data