Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int day = Integer.parseInt(scanner.nextLine());
- String[] week = {
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- };
- if (day > 0 && day < 8) {
- System.out.println(week[day - 1]);
- } else {
- System.out.println("Invalid day!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement