//WAJP to print the Week Days. (i.e. 1 for Sunday, 2 for Monday, … ,7 for Saturday)
import java.util.*;
class WeekDays
{
public static void main()
{
int d;
Scanner sc=new Scanner(System.in);
System.out.print("Enter the Day Number ");
d=sc.nextInt();
if(d==1)
{
System.out.println("It is a Sunday");
}
if(d==2)
{
System.out.println("It is a Monday");
}
if(d==3)
{
System.out.println("It is a Tuesday");
}
if(d==4)
{
System.out.println("It is a Wednesday");
}
if(d==5)
{
System.out.println("It is a Thursday");
}
if(d==6)
{
System.out.println("It is a Friday");
}
if(d==7)
{
System.out.println("It is a Saturday");
}
if(d>7)
{
System.out.println("There is only seven days in a week");
}
}
}
//WAJP to print the Month Names. (i.e. 1 for January, 2 for February, … ,12 for December)
import java.util.*;
class WeekDays
{
public static void main()
{
int m;
Scanner sc=new Scanner(System.in);
System.out.print("Enter the Month Number: ");
m=sc.nextInt();
if(m==1)
{
System.out.println("January");
}
if(m==2)
{
System.out.println("February");
}
if(m==3)
{
System.out.println("March");
}
if(m==4)
{
System.out.println("April");
}
if(m==5)
{
System.out.println("May");
}
if(m==6)
{
System.out.println("June");
}
if(m==7)
{
System.out.println("July");
}
if(m==8)
{
System.out.println("August");
}
if(m==9)
{
System.out.println("September");
}
if(m==10
{
System.out.println("October");
}
if(m==11)
{
System.out.println("November");
}
if(m==12)
{
System.out.println("December");
}
if(m>12)
{
System.out.println("There are only Twelve Months in a Year");
}
}
}
import java.util.*;
class WeekDays
{
public static void main()
{
int m;
Scanner sc=new Scanner(System.in);
System.out.print("Enter any Number: ");
m=sc.nextInt();
if(m==1)
{
System.out.println("One");
}
if(m==2)
{
System.out.println("Two");
}
if(m==3)
{
System.out.println("Three");
}
if(m==4)
{
System.out.println("Four");
}
if(m==5)
{
System.out.println("Five");
}
if(m==6)
{
System.out.println("Six");
}
if(m==7)
{
System.out.println("Seven");
}
if(m==8)
{
System.out.println("Eight");
}
if(m==9)
{
System.out.println("Nine");
}
if(m==10
{
System.out.println("Ten");
}
if(m>10)
{
System.out.println("There are only Twelve Months in a Year");
}
}
}