public int Part2(string input) { var target = new Day26(); return(target.Part2(input)); }
public static void ProcessInputDay(int dayValue) { switch (dayValue) { case 0: Day0.CallGreet(); break; case 1: Day1.ReturnSumByType(); break; case 2: Day2.InputValues(); break; case 3: Day3.ConditionalStaments(); break; case 4: Day4.PersonAge(); break; case 5: Day5.MultiplicationTable(); break; case 6: Day6.Review(); break; case 7: Day7.ArrayNumber(); break; case 8: Day8.PhoneDirectory(); break; case 9: Day9.FactorialNumber(); break; case 10: Day10.ConvertNumber(); break; case 11: Day11.HourGlass2DArray(); break; case 12: Day12.InharenceExercise(); break; case 13: Day13.AbstractClassExercise(); break; case 14: Day14.AbsoluteNumber(); break; case 15: Day15.LinkedList(); break; case 16: Day16.ExceptionStringToInt(); break; case 17: Day17.NonNegativesNumbers(); break; case 18: Day18.Palindrome(); break; case 19: Day19.InterfaceExcersise(); break; case 20: Day20.SortingValue(); break; case 21: Day21.GenericPrint(); break; case 22: Day22.NodeRoot(); break; case 23: Day23.Search(); break; case 24: Day24.LinkedList(); break; case 25: Day25.PrimeOrNot(); break; case 26: Day26.Nested(); break; case 28: Day_28.RegexTester(); break; case 29: Day29.BitwiseAND(); break; default: Console.WriteLine("Coming soon..."); break; } }
static void Main(string[] args) { bool confirmed = false; do { Console.WriteLine("Welcome to HackerRank's 30 Days of Code"); Console.WriteLine("Days"); for (int i = 0; i < dias.Length; i++) { Console.WriteLine(dias[i]); } Console.WriteLine("Write the day number to be executed: "); int opt = Convert.ToInt32(Console.ReadLine()); switch (opt) { case 1: Day1.Execute(); break; case 2: Day2.Execute(); break; case 3: Day3.Execute(); break; case 4: Day4.Execute(); break; case 5: Day5.Execute(); break; case 6: Day6.Execute(); break; case 7: Day7.Execute(); break; case 8: Day8.Execute(); break; case 9: Day9.Execute(); break; case 10: Day10.Execute(); break; case 11: Day11.Execute(); break; case 12: Day12.Execute(); break; case 13: Day13.Execute(); break; case 14: Day14.Execute(); break; case 15: Day15.Execute(); break; case 16: Day16.Execute(); break; case 17: Day17.Execute(); break; case 18: Day18.Execute(); break; case 19: Day19.Execute(); break; case 20: Day20.Execute(); break; case 21: Day21.Execute(); break; case 22: Day22.Execute(); break; case 23: Day23.Execute(); break; case 24: Day24.Execute(); break; case 25: Day25.Execute(); break; case 26: Day26.Execute(); break; case 27: Day27.Execute(); break; case 28: Day28.Execute(); break; case 29: Day29.Execute(); break; default: Console.WriteLine("Not Implemeted"); break; } ConsoleKey response; do { Console.Write("Execute another function? (Y/N) "); response = Console.ReadKey(false).Key; if (response != ConsoleKey.Enter) { Console.WriteLine(); } }while(response != ConsoleKey.Y && response != ConsoleKey.N); confirmed = response == ConsoleKey.N; }while(!confirmed); }