Exemple #1
0
        static void PrintRange(int low, int high)
        {
            Console.WriteLine();
            Console.WriteLine("Values from {0} to {1}:", low, high);

            for (int x = low; x <= high; x++)
            {
                Console.WriteLine("{0} = '{1}'", x, EnglishNumberConverter.Convert(x));
            }
        }
Exemple #2
0
        static void TestValue(int val, string expected)
        {
            string result = EnglishNumberConverter.Convert(val);

            if (result != expected)
            {
                Console.WriteLine("FAILED at Value: {0}", val);
                Console.WriteLine("  Expected: '{0}'", expected);
                Console.WriteLine("  Received: '{0}'", result);
            }

            Console.WriteLine("PASSED: {0} = '{1}'", val, result);
        }
Exemple #3
0
 static void PrintValue(int val)
 {
     Console.WriteLine("{0} = '{1}'", val, EnglishNumberConverter.Convert(val));
 }