Convert number to words
I've never tackled such a problem before, so I'll proceed with this cautiously.


You don't need to declare those three variables and then assign to them.  Instead, initialize them right away where they're first used.

You can also move number right above the cin for slightly closer scope.

std::cout &lt;&lt; "Enter the number: ";
int number;
std::cin &gt;&gt; number;
int first_digit = number/10;
int second_digit = number%10;

I suppose switch is an okay choice for this program.  Either way, the switch can still be condensed while making the program more modular (with functions).

Here's what 11-20 could look like within its own function:

std::string elevenThroughTwenty(unsigned int number)
{
    switch (number)
    {
        case 11: return "eleven";
        // ...
        case 20: return "twenty"; // you forgot the 20 in your code

        // throw an exception if number not in the switch
        // include &lt;stdexcept&gt; to use this
        default: throw std::logic_error("Not 11 through 20");
    }
}


Separating them as such helps with readability, organization, and conciseness.  You will also need proper defaults so that invalid numbers don't cause crippling errors.