Breaking down a dollar amount into bill and coin denominations
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?