Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- private static void Main()
- {
- int monthNumber = int.Parse(Console.ReadLine());
- string season;
- switch (monthNumber)
- {
- case 12:
- case 1:
- case 2:
- season= "Winter";
- break;
- case 3:
- case 4:
- case 5:
- season = "Spring";
- break;
- case 6:
- case 7:
- case 8:
- season = "Summer";
- break;
- case 9:
- case 10:
- case 11:
- season = "Autumn";
- break;
- default:
- season = "Error!";
- break;
- }
- Console.WriteLine(season);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment