String[] d = new String[7];
d[0] = "Monday";
d[1] = "Tuesday";
d[2] = "Wednesday";
d[3] = "Thursday";
d[4] = "Friday";
d[5] = "Saturday";
d[6] = "Sunday";
if (c >= 0 && c <=7) {
System.out.println(d[c-1]);
}
else
System.out.println("No such day of the week");
package com.codegym.task.task04.task0413;
/*
Day of the week
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader a = new BufferedReader(new InputStreamReader(System.in));
String b = a.readLine();
int c = Integer.parseInt(b);
String[] d = new String[7];
d[0] = "Monday";
d[1] = "Tuesday";
d[2] = "Wednesday";
d[3] = "Thursday";
d[4] = "Friday";
d[5] = "Saturday";
d[6] = "Sunday";
if (c >= 0 && c <=7) {
System.out.println(d[c-1]);
}
else
System.out.println("No such day of the week");
}
}