Breaking down a dollar amount into bill and coin denominations I've started coding C++ again after a 6 month break to prepare for a class I'm taking this quarter. I found this idea and thought it would be fun to try and code.

I originally started with input as a string, and wanted to split it into two ints at ., but this way seemed easier.  Then came the rounding errors. This is why I multiply by such a large number, and 100 was still giving me incorrect values.  I'm really just looking for any feedback on ways I could improve my code, stylistically or otherwise. 

cout &lt;&lt; "Welcome to Dollar Break Down!" &lt;&lt; endl; //print welcome message
cout &lt;&lt; "Please enter a dollar amount: ";        // prompt for input of a dollar amount

double amt;                                                         // var to store the amount
cin &gt;&gt; amt;                                                         // read in and store amount
cout &lt;&lt; endl;                                                       // spacing

int dollars = amt;                                                  // dollars = (int)amt ex: int(45.97) = 45

// compute dollars
dollars / 100 == 1 ?                                                // check if bill amount is single or plural
    cout &lt;&lt; dollars / 100 &lt;&lt; " hundred" &lt;&lt; endl :                   // print singe
    cout &lt;&lt; dollars / 100 &lt;&lt; " hundreds" &lt;&lt; endl;                   // print plural
dollars = dollars % 100;                                            // compute remainder after removing bill amount
dollars / 50 == 1 ?                                         
    cout &lt;&lt; dollars / 50 &lt;&lt; " fifty" &lt;&lt; endl :                      // repeat for each bill type
    cout &lt;&lt; dollars / 50 &lt;&lt; " fifties" &lt;&lt; endl;
dollars = dollars % 50;
dollars / 20 == 1 ?
    cout &lt;&lt; dollars / 20 &lt;&lt; " twenty" &lt;&lt; endl :
    cout &lt;&lt; dollars / 20 &lt;&lt; " twenties" &lt;&lt; endl;
dollars = dollars % 20;
dollars / 10 == 1 ?
    cout &lt;&lt; dollars / 10 &lt;&lt; " ten" &lt;&lt; endl :
    cout &lt;&lt; dollars / 10 &lt;&lt; " tens" &lt;&lt; endl;
dollars = dollars % 10;
dollars / 5 == 1 ?
    cout &lt;&lt; dollars / 5 &lt;&lt; " five" &lt;&lt; endl :
    cout &lt;&lt; dollars / 5 &lt;&lt; " fives" &lt;&lt; endl;
dollars = dollars % 5;
dollars / 1 == 1 ?
    cout &lt;&lt; dollars / 1 &lt;&lt; " one" &lt;&lt; endl: 
    cout &lt;&lt; dollars / 1 &lt;&lt; " ones" &lt;&lt; endl;

cout &lt;&lt; endl;                                                   // spacing between dollars and cents

dollars = amt;                                                  // reset dollars to amt for cents calculation
amt *= 10000;                                                   // multiply to remove rounding errors
dollars *= 10000;                                               // same thing
int cents = (amt - dollars) / 100;                              // compute cents without rounding errors

// compute cents
cents / 25 == 1 ?
    cout &lt;&lt; cents / 25 &lt;&lt; " quarter" &lt;&lt; endl :
    cout &lt;&lt; cents / 25 &lt;&lt; " quarters" &lt;&lt; endl;
cents = cents % 25;
cents / 10 == 1 ?
    cout &lt;&lt; cents / 10 &lt;&lt; " dime" &lt;&lt; endl :
    cout &lt;&lt; cents / 10 &lt;&lt; " dimes" &lt;&lt; endl;
cents = cents % 10;
cents / 25 == 1 ?
    cout &lt;&lt; cents / 5 &lt;&lt; " nickel" &lt;&lt; endl :
    cout &lt;&lt; cents / 5 &lt;&lt; " nickels" &lt;&lt; endl;
cents = cents % 5;
cents / 25 == 1 ?
    cout &lt;&lt; cents / 1 &lt;&lt; " penny" &lt;&lt; endl :
    cout &lt;&lt; cents / 1 &lt;&lt; " pennies" &lt;&lt; endl;
Stylistically:


just write std:: instead of using namespace std; (which you didn't show but was implicit)
use a regular if() instead of the ternary operator ? 
use compound assignment operators like dollars %= 10; instead of dollars = dollars % 10;
I'm not a big fan of end-of-line comments, but at the very least, try and put them inside the 80 column mark (most editors will show a marker)


Furthermore, it's a good exercise to make your code more general:


put the bills (1, 5, 10, 20, 50, 100) and their strings in a std::map, and write your code as a loop over that map. This way you can start to test with only small bills, and then expand to the general problem
a propos, where are your tests?