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 month;
- switch (monthNumber)
- {
- case 1:
- month = "January";
- break;
- case 2:
- month = "February";
- break;
- case 3:
- month = "March";
- break;
- case 4:
- month = "April";
- break;
- case 5:
- month = "May";
- break;
- case 6:
- month = "June";
- break;
- case 7:
- month = "July";
- break;
- case 8:
- month = "August";
- break;
- case 9:
- month = "September";
- break;
- case 10:
- month = "Octomber";
- break;
- case 11:
- month = "November";
- break;
- case 12:
- month = "December";
- break;
- default:
- month = "Error!";
- break;
- }
- Console.WriteLine(month);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment