Esempio n. 1
0
    public static void Main()
    {
        Console.WriteLine("Please enter a number:");
        int input = int.Parse(Console.ReadLine());

        if (input < 20)
        {
            NumberConvert newNumber = new NumberConvert(input);
            newNumber.OnesName();
            foreach (string item in NumberConvert.masterList)
            {
                Console.WriteLine(item);
            }
        }
        else if (input > 19 && input < 100)
        {
            NumberConvert newNumber = new NumberConvert(input);
            newNumber.TensName();
            foreach (string item in NumberConvert.masterList)
            {
                Console.WriteLine(item);
            }
        }
        else if (input > 99 && input < 1000)
        {
            NumberConvert newNumber = new NumberConvert(input);
            newNumber.HundredsName();
            foreach (string item in NumberConvert.masterList)
            {
                Console.WriteLine(item);
            }
        }
    }
Esempio n. 2
0
        public void HundredsName_RecieveLetterNameOfNumber_String()
        {
            NumberConvert newNumber = new NumberConvert(123);
            string        result    = newNumber.HundredsName();

            Assert.AreEqual("one hundred twenty three", result);
        }