Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class WorkingHours {
- public static void main(String[] args) {
- Scanner scanner=new Scanner(System.in);
- int A = Integer.parseInt(scanner.nextLine());
- String B = scanner.nextLine();
- if ( B.equals("Sunday")){
- System.out.println("closed");
- }else if(A>=10 && A<=18 ){
- System.out.println("open");
- }else{
- System.out.println("closed");
- }
- }
- }
Add Comment
Please, Sign In to add comment