コード例 #1
0
        /*
         *     "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "hundred", "thousand",
         *      "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty",
         *      "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"
         */
        static void Main(string[] args)
        {
            int k = 0;

            while (k != 3)
            {
                Menu();
                string str = null;
                k = Convert.ToInt16(Console.ReadLine());
                switch (k)
                {
                case 1:
                    Console.Write("Введите предложение: ");
                    str = Console.ReadLine();
                    Console.WriteLine("Исправленное предложение: " + StrEdit.ConvertLettersUp(str));
                    break;

                case 2:
                    Console.Write("Enter the amount in rubles: ");
                    str = Console.ReadLine();
                    Console.WriteLine("Amount in usd: " + StrEdit.ConvertRubToUsd(str) + " $");
                    break;

                case 3:
                    break;

                default:
                    Console.WriteLine("Нет такого пункта!");
                    break;
                }
                Console.ReadKey();
            }
        }
コード例 #2
0
        public void ConvertLetterToUp3()
        {
            String str1 = "Let's go to river. i want swiming";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Let's go to river. I want swiming.";

            Assert.AreEqual(expected, str1);
        }
コード例 #3
0
        public void ConvertLetterToUp2()
        {
            String str1 = "Рыбак ловит рыбу.   Плавец плывёт. человек побежал";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Рыбак ловит рыбу. Плавец плывёт. Человек побежал.";

            Assert.AreEqual(expected, str1);
        }
コード例 #4
0
        public void ConvertLetterToUp1()
        {
            String str1 = "Привет.         как дела";

            str1 = StrEdit.ConvertLettersUp(str1);
            String expected = "Привет. Как дела.";

            Assert.AreEqual(expected, str1);
        }