Example #1
0
        static void Main(string[] args)
        {
            bool repeat = true;

            Console.WriteLine("ADVENT OF CODE 2016");

            while (repeat)
            {
                Console.Write("Select day(1-25): ");
                string day = Console.ReadLine();

                switch (day)
                {
                case "1":
                    Day1 day1 = new Day1();
                    day1.Run();
                    break;

                case "0":
                    repeat = false;
                    break;

                default:
                    break;
                }
            }

            Console.WriteLine("hej då");
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Choose day to run:");
                foreach (var day in Enumerable.Range(1, 24))
                {
                    Console.WriteLine($"Day: {day}");
                }
                var input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    Console.Clear();
                    Day1.Run();
                    break;

                case "2":
                    Console.Clear();
                    Day2.Run();
                    break;
                }
                Console.ReadKey();
            }
        }
        static void Main(string[] args)
        {
            bool repeat = true;

            Console.WriteLine("ADVENT OF CODE 2016");
            Console.WriteLine("#######GODJUL#######");

            while (repeat)
            {
                Console.Write("Select day(1-25, 0 to exit): ");
                string day = Console.ReadLine();
                Console.WriteLine();

                switch (day)
                {
                case "1":
                    Day1 day1 = new Day1();
                    day1.Run();
                    break;

                case "2":
                    Day2 day2 = new Day2();
                    day2.Run();
                    break;

                case "3":
                    Day3 day3 = new Day3();
                    day3.Run();
                    break;

                case "4":
                    Day4 day4 = new Day4();
                    day4.Run();
                    break;

                case "5":
                    Day5 day5 = new Day5();
                    day5.Run();
                    break;

                case "6":
                    Day6 day6 = new Day6();
                    day6.Run();
                    break;

                case "7":
                    Day7 day7 = new Day7();
                    day7.Run();
                    break;

                case "0":
                    repeat = false;
                    break;

                default:
                    break;
                }
                Console.WriteLine();
            }

            Console.WriteLine("hej då");
            Console.ReadKey();
        }