Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ExamPreparation
- {
- public enum DaysOfWeek
- {
- Monday = 1,
- Tuesday,
- Wednesday,
- Thursday,
- Friday,
- Saturday,
- Sunday
- }
- class Startup
- {
- static void Main()
- {
- int day = int.Parse(Console.ReadLine());
- if (day < 1 || day > 7)
- {
- Console.WriteLine("Invalid Day!");
- }
- else
- {
- DaysOfWeek weekDay = (DaysOfWeek)day;
- Console.WriteLine(weekDay);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement