Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Write out a string, phrase or sentence below:");
            string input1    = Console.ReadLine();
            string cutInput1 = H3.CutJunk(input1);

            Console.Write("Type out a series of characters to find (no more than 3): ");
            string input2 = Console.ReadLine();

            while (input2.Length > 3)
            {
                Console.WriteLine("I'm sorry, you must not have heard me.");
                Console.Write("Type out a series of characters to find (no more than 3): ");
                input2 = Console.ReadLine();
            }

            string cutInputLower1 = cutInput1.ToLower();
            string inputLower2    = input2.ToLower();
            bool   check          = H3.InString(cutInputLower1, inputLower2);


            if (check == true)
            {
                Console.WriteLine("TRUE");
            }

            else
            {
                Console.WriteLine("FALSE");
            }
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Write out a string, phrase or sentence below:");
            string input1    = Console.ReadLine();
            string cutInput1 = H3.CutJunk(input1);

            Console.Write("Type out a series of characters to find (no more than 3): ");
            string input2 = Console.ReadLine();

            while (input2.Length > 3)
            {
                Console.WriteLine("I'm sorry, you must not have heard me.");
                Console.Write("Type out a series of characters to find (no more than 3): ");
                input2 = Console.ReadLine();
            }

            string cutInputLower1 = cutInput1.ToLower();
            string inputLower2    = input2.ToLower();
            int    check          = H4.FindWord(cutInputLower1, inputLower2);
            int    posn           = check + 1;

            Console.WriteLine(posn);
        }