Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- namespace GuessTheSeason
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine();
- int day = int.Parse(Console.ReadLine());
- if (month == "March")
- {
- if (day>= 20)
- {
- Console.WriteLine("Spring");
- }
- else
- {
- Console.WriteLine("Winter");
- }
- }
- else if (month == "April" || month == "May")
- {
- Console.WriteLine("Spring");
- }
- else if (month== "June")
- {
- if (day <= 20)
- {
- Console.WriteLine("Spring");
- }
- else
- {
- Console.WriteLine("Summer");
- }
- }
- else if (month == "July"||month == "August")
- {
- Console.WriteLine("Summer");
- }
- else if (month == "September")
- {
- if (day<= 22)
- {
- Console.WriteLine("Summer");
- }
- else
- {
- Console.WriteLine("Autumn");
- }
- }
- else if (month == "October")
- {
- Console.WriteLine("Autumn");
- }
- else if (month == "December")
- {
- if (day <= 20)
- {
- Console.WriteLine("Autumn");
- }
- else
- {
- Console.WriteLine("Winter");
- }
- }
- else if (month == "January" || month == "February")
- {
- Console.WriteLine("Winter");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement