Example #1
0
        private static void RunDay1()
        {
            Console.WriteLine("Day1:");
            List <int> expenses = ReadFileByLineAsInt(".//Day1//input");
            Day1       day1     = new Day1(expenses);
            int        result   = day1.Execute();

            Console.WriteLine(day1.Expense1.ToString() + " * " + day1.Expense2.ToString() + " * " + day1.Expense3.ToString() + " = " + result.ToString());
        }
Example #2
0
        static void Main(string[] args)
        {
            var dayOneInput = File.ReadLines("Inputs/Day1Input.txt").Select(line => int.Parse(line)).ToList();

            Console.WriteLine($"Day One Part One: {Day1.PartOne(dayOneInput)}");
            Console.WriteLine($"Day One Part Two: {Day1.PartTwo(dayOneInput)}");

            var dayTwoInput     = File.ReadAllLines("Inputs/Day2Input.txt");
            var dayTwoInputList = new List <string>(dayTwoInput);

            Console.WriteLine($"Day Two Part One: {Day2.PartOne(dayTwoInputList)}");
            Console.WriteLine($"Day Two Part Two: {Day2.PartTwo(dayTwoInputList)}");

            var dayThreeInput     = File.ReadAllLines("Inputs/Day3Input.txt");
            var dayThreeInputList = new List <string>(dayThreeInput);

            Console.WriteLine($"Day Three Part One: {Day3.PartOne(dayThreeInputList)}");
            Console.WriteLine($"Day Three Part Two: {Day3.PartTwo(dayThreeInputList)}");
        }