Converting 3 digit numbers to text
<p>I have most of this done but am confused on how I would add the "twenties" I have all the "ones" and "teens" but it stops at 119 because I do not have the "twenties". In static string ThreeDigit is where I have it set up to do the three digit numbers.</p>

<pre><code>{
class Program
{
    static string[] digitWords =
    { "zero", "one", "two", "three", "four",
        "five", "six", "seven", "eight", "nine",
        "ten", "eleven", "twelve", "thirteen", "fourteen",
        "fifteen", "sixteen", "seventeen", "eighteen", "nineteen" };

    static string[] tenWords =
    { "", "", "twenty", "thirty", "forty",
      "fifty", "sixty", "seventy", "eighty", "ninety" };

    static string[] hundredWords = { "", "One-hundred", "two-hundred", "three-hundred", "four-hundred", "five-hundred", "six-hundred", "seven-hundred", "eight-hundred", "nine-hundred"};

    static string TwoDigit(int num)
    {
        if (num &lt; 0 || num &gt; 1001) return "";
        if (num &lt; 20) return digitWords[num];
        if (num % 10 == 0)
            return tenWords[num / 10];
        else
            return tenWords[num / 10] + "-" + digitWords[num % 10];
    }

    static string ThreeDigit(int num)
    {
        if (num % 100 == 0)
            return hundredWords[num / 100];
        else
            return hundredWords[num / 100] + "-" + digitWords[num % 100];
    }


    static void Main(string[] args)
    {
        for (int i = 0; i &lt;= 19; i++)
            Console.WriteLine("{0}: {1}", i, TwoDigit(i));
        for (int i = 20; i &lt;= 99; i +=7)
            Console.WriteLine("{0}: {1}", i, TwoDigit(i));
        for (int i = 100; i &lt;= 1100; i ++)
            Console.WriteLine("{0}: {1}", i, ThreeDigit(i));
    }
}
</code></pre>

<p>}</p>
