Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Collections;
- namespace Forum
- {
- class Program
- {
- static void Main(string[] args)
- {
- do
- {
- Console.WriteLine("Input month: ");
- string month = Console.ReadLine();
- Calendar calendar = new Calendar();
- string MonthResault = calendar.FindSeason(month);
- Console.WriteLine("{0}{1}", month, MonthResault);
- Console.WriteLine();
- } while (true);
- }
- }
- class Calendar
- {
- public string FindSeason(string Month)
- {
- switch (Month)
- {
- case "December":
- case "January":
- case "Febriary":
- {
- return " Winter Month";
- }
- case "March":
- case "April":
- case "May":
- {
- return " Spring Month";
- }
- case "June":
- case "July":
- case "August":
- {
- return " Summer Month";
- }
- case "September":
- case "October":
- case "November":
- {
- return " Autumn Month";
- }
- default:
- return " We input incorrect value. Repeat please";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement