Advertisement
aslen

Untitled

Feb 28th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.57 KB | None | 0 0
  1.  
  2. using System;
  3. using System.Text;
  4. using System.Collections;
  5.  
  6. namespace Forum
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             do
  13.             {
  14.                 Console.WriteLine("Input month: ");
  15.                 string month = Console.ReadLine();
  16.                 Calendar calendar = new Calendar();
  17.  
  18.                 string MonthResault = calendar.FindSeason(month);
  19.                 Console.WriteLine("{0}{1}", month, MonthResault);
  20.                 Console.WriteLine();
  21.  
  22.             } while (true);
  23.         }
  24.     }
  25.     class Calendar
  26.     {
  27.         public string FindSeason(string Month)
  28.         {
  29.             switch (Month)
  30.             {
  31.                 case "December":
  32.                 case "January":
  33.                 case "Febriary":
  34.                     {
  35.                         return " Winter Month";
  36.                     }
  37.                 case "March":
  38.                 case "April":
  39.                 case "May":
  40.                     {
  41.                         return " Spring Month";
  42.                     }
  43.                 case "June":
  44.                 case "July":
  45.                 case "August":
  46.                     {
  47.                         return " Summer Month";
  48.                     }
  49.                 case "September":
  50.                 case "October":
  51.                 case "November":
  52.                     {
  53.                         return " Autumn Month";
  54.                     }
  55.                 default:
  56.                     return " We input incorrect value. Repeat please";
  57.             }
  58.         }
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement