dhows

задача 65

Feb 28th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. class Program
  2.     {
  3.         static void Main(string[] args)
  4.         {
  5.             Console.Write("Enter month: ");
  6.             int month = int.Parse(Console.ReadLine());
  7.  
  8.             if (month == 1 || month == 12)
  9.             {
  10.                 Console.WriteLine("3.8");
  11.             }
  12.             else if (month == 2 || month == 3 || month == 4)
  13.             {
  14.                 Console.WriteLine("3.5");
  15.             }
  16.             else if (month == 5 || month == 6 || month == 7 || month == 8)
  17.             {
  18.                 Console.WriteLine("4.1");
  19.             }
  20.             else if (month == 9 || month == 10 || month == 11)
  21.             {
  22.                 Console.WriteLine("4.9");
  23.             }
  24.             else
  25.             {
  26.                 Console.WriteLine("Invalid month!");
  27.             }
  28.         }
  29.     }
Add Comment
Please, Sign In to add comment