public static void Main(string[] args)
Days student=Days.NoClasses ;
Console.WriteLine(" Let make the week schedule");
Console.WriteLine("Input number of day from 1 to 7 to check schedule for a day");
Console.WriteLine("Input 8 to see whole week schedule");
Console.WriteLine("Input 0 to exit");
Console.WriteLine("Classes will be on the following days: {0}", student);
checkResult=(Days)dayChecker==(student&(Days)dayChecker);
Console.WriteLine("In the {0} {1} classes",(Days)dayChecker, checkResult==true? "will be" : "wil not be" );
public static void MakeSchedule()
Days student=Days.NoClasses;
Console.WriteLine(" Input number of days when there are classes");
Console.WriteLine(" Number of days starting from 1 for Monday to 7 for Sunday");
Console.WriteLine(" Each number shall be separeted by coma");
Console.WriteLine(" For example: 1,5,7 means that the classes will be on Monday, Friday and Sunday");
schedule = Console.ReadLine();
schedule1=schedule.Split(',');
foreach ( string s in schedule1)
s2=1<<Convert.ToInt32(s)-1;
student=student|(Days)s2;
public static int CheckInput(int s, int f)
result = Int32.TryParse(Console.ReadLine(), out input);
if (!result | input>f | input<s )
Console.WriteLine("Invalid input");
while (!result | input>f | input<s );