Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TestSomeThings
- {
- public class StartUp
- {
- static void Main(string[] args)
- {
- try
- {
- int num = int.Parse(Console.ReadLine());
- switch (num)
- {
- case 1:
- Console.WriteLine("Monday");
- break;
- case 2:
- Console.WriteLine("Tuesday");
- break;
- case 3:
- Console.WriteLine("Wednesday");
- break;
- case 4:
- Console.WriteLine("Thursday");
- break;
- case 5:
- Console.WriteLine("Friday");
- break;
- case 6:
- Console.WriteLine("Saturday");
- break;
- case 7:
- Console.WriteLine("Sunday");
- break;
- default:
- Console.WriteLine("Error");
- break;
- }
- }
- catch (Exception)
- {
- Console.WriteLine("An error occurred! The input is not in the correct format!\n Please start the program and try again.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement