packag
e com.codegym.task.task04.task0413;
/*
Day of the week
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Bufferedreader input = new Bufferedreader(new Inputstreamereader(System.in));
int number;
System.out.println("Enter a number between 1-7");
number = input.nextInt();
if (number > 7 || number < 0) {
System.out.println("No such day of the week");
}
else if (number == 7) {
System.out.println("Sunday");
}
else if (number == 6) {
System.out.println("Saturday");
}
else if (number == 5) {
System.out.println("Friday");
}
else if (number == 4) {
System.out.println("Thursday");
}
else if (number == 3) {
System.out.println("Wednesday");
}
else if (number == 2) {
System.out.println("Tuesday");
}
else if (number ==1) {
System.out.println("Monday");
}
}
package com.codegym.task.task04.task0413;
/*
Day of the week
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Bufferedreader input = new Bufferedreader(new Inputstreamereader(System.in));
int number;
System.out.println("Enter a number between 1-7");
number = input.nextInt();
if (number > 7 || number < 0) {
System.out.println("No such day of the week");
}
else if (number == 7) {
System.out.println("Sunday");
}
else if (number == 6) {
System.out.println("Saturday");
}
else if (number == 5) {
System.out.println("Friday");
}
else if (number == 4) {
System.out.println("Thursday");
}
else if (number == 3) {
System.out.println("Wednesday");
}
else if (number == 2) {
System.out.println("Tuesday");
}
else if (number ==1) {
System.out.println("Monday");
}
}