Advertisement
Guest User

Guess The Season

a guest
Oct 22nd, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. using System;
  2. using System.Runtime.InteropServices;
  3.  
  4. namespace GuessTheSeason
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. string month = Console.ReadLine();
  11. int day = int.Parse(Console.ReadLine());
  12.  
  13. if (month == "March")
  14. {
  15. if (day>= 20)
  16. {
  17. Console.WriteLine("Spring");
  18. }
  19.  
  20. else
  21. {
  22. Console.WriteLine("Winter");
  23. }
  24.  
  25. }
  26.  
  27. else if (month == "April" || month == "May")
  28. {
  29. Console.WriteLine("Spring");
  30. }
  31.  
  32. else if (month== "June")
  33. {
  34. if (day <= 20)
  35. {
  36. Console.WriteLine("Spring");
  37. }
  38.  
  39. else
  40. {
  41. Console.WriteLine("Summer");
  42. }
  43. }
  44.  
  45. else if (month == "July"||month == "August")
  46. {
  47. Console.WriteLine("Summer");
  48. }
  49.  
  50. else if (month == "September")
  51. {
  52. if (day<= 22)
  53. {
  54. Console.WriteLine("Summer");
  55. }
  56. else
  57. {
  58. Console.WriteLine("Autumn");
  59. }
  60. }
  61.  
  62. else if (month == "October")
  63. {
  64. Console.WriteLine("Autumn");
  65. }
  66.  
  67. else if (month == "December")
  68. {
  69. if (day <= 20)
  70. {
  71. Console.WriteLine("Autumn");
  72. }
  73.  
  74. else
  75. {
  76. Console.WriteLine("Winter");
  77. }
  78. }
  79.  
  80. else if (month == "January" || month == "February")
  81. {
  82. Console.WriteLine("Winter");
  83. }
  84.  
  85. }
  86. }
  87. }
  88.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement