aneliabogeva

Weekend or working day

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