import java.util.*;
public class DateUse
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.println("Enter date (Day, Month, Year)");
Date date = new Date(in.nextInt(),in.nextInt(), in.nextInt());
if(date.getMonth() == 12 || date.getMonth() <= 3)
{
System.out.println("Winter");
}
else if(date.getMonth() == 4 || date.getMonth() == 5)
{
System.out.println("Spring");
}
else if(date.getMonth() >= 6 && date.getMonth() <= 9)
{
System.out.println("Summer");
}
else if(date.getMonth() == 10 || date.getMonth() == 11)
{
System.out.println("Autumn");
}
}
}
Comments