Ejemplo n.º 1
0
        static void Main(String[] args)
        {
            timus1089     t  = new timus1089();
            StringBuilder sb = new StringBuilder();

            while (true)
            {
                String temp = Console.ReadLine();
                if (temp.Equals("#"))
                {
                    break;
                }
                else
                {
                    sb.Append(temp + "|");
                }
            }
            t.buildDictionary(sb.ToString());
            t.correctMistakes(Console.In.ReadToEnd());

            /*TESTING
             * String[] dict ={ "country", "occupies", "surface", "covers", "russia", "largest", "europe", "part", "about", "world" };
             * t.dictionary = dict;
             * t.sizeOfDictionary = dict.Length;
             * string msg = "the rushia is the larjest cauntry in the vorld. it ockupies ebout one-seventh of the earth's surfase. it kovers the eastern park of yurope and the northern park of asia.";
             * t.correctMistakes(msg); */
            //if (t.compareWords("vorld", "vorl")) Console.WriteLine("TRUE WITH VORLD");
            //if (t.compareWords("mon", "moon")) Console.WriteLine(":)");
            Console.Read();
        }
Ejemplo n.º 2
0
        static void Main(String[] args)
        {
            timus1089 t = new timus1089();
            StringBuilder sb = new StringBuilder();
            while(true){
                String temp= Console.ReadLine();
                if (temp.Equals("#")) break;
                else sb.Append(temp+"|");
            }
            t.buildDictionary(sb.ToString());
            t.correctMistakes(Console.In.ReadToEnd());

            /*TESTING
               String[] dict ={ "country", "occupies", "surface", "covers", "russia", "largest", "europe", "part", "about", "world" };
               t.dictionary = dict;
               t.sizeOfDictionary = dict.Length;
               string msg = "the rushia is the larjest cauntry in the vorld. it ockupies ebout one-seventh of the earth's surfase. it kovers the eastern park of yurope and the northern park of asia.";
               t.correctMistakes(msg); */
            //if (t.compareWords("vorld", "vorl")) Console.WriteLine("TRUE WITH VORLD");
            //if (t.compareWords("mon", "moon")) Console.WriteLine(":)");
            Console.Read();
        }