static void Main(string[] args) { Console.WriteLine("Hello World or Integers and Strings"); Console.WriteLine(); ReverseTypes reverseSomeThing = new ReverseTypes(); Console.Write("Enter a number: "); int InputNumber = int.Parse(Console.ReadLine()); Console.WriteLine($"Reverse of that number: {reverseSomeThing.ReverseIntegers(InputNumber)}"); Console.WriteLine(); Console.Write("Enter a set of words: "); string InputWords = Console.ReadLine(); Console.WriteLine($"Reverse order of those words: {reverseSomeThing.ReverseWord(InputWords)}"); Console.WriteLine($"Reverse letters in each word: {reverseSomeThing.ReverseLettersInEachWord(InputWords)}"); Console.WriteLine($"Reverse all letters in sentence: {reverseSomeThing.ReverseAllLetters(InputWords)}"); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("Hello Reverse Arrays and Reverse Strings!"); ReverseTypes reverseSomething = new ReverseTypes(); Console.WriteLine(""); int[] inputOne = new int[] { 0, 1, 2, 3, 4 }; int[] inputTwo = new int[] { 111, 99, 88, 77, 66, 55, 44, 33, 22, 11 }; Console.WriteLine("Input array is [0, 1, 2, 3, 4]"); Console.WriteLine($"Reverse: [{String.Join(", ", reverseSomething.ReverseInputArray(inputOne))}]"); Console.WriteLine(""); Console.WriteLine("Input array is [111, 99, 88, 77, 66, 55, 44, 33, 22, 11]"); Console.WriteLine($"Reverse: [{String.Join(", ", reverseSomething.ReverseInputArray(inputTwo))}]"); Console.WriteLine(""); Console.WriteLine("Input string is : 'what does the fox say' "); Console.WriteLine($"Reverse: {reverseSomething.ReverseInputString("what does the fox say")}"); _ = Console.ReadLine(); }