title: How can I format currency with commas in C?
body: <p>I'm looking to format a Long Float as currency in C.  I would like to place a dollar sign at the beginning, commas iterating every third digit before decimal, and a dot immediately before decimal.  So far, I have been printing numbers like so:</p>
  
  <p><code>printf("You are owed $%.2Lf!\n", money);</code></p>
  
  <p>which returns somehting like</p>
  
  <p><code>You are owed $123456789.00!</code></p>
  
  <p>Numbers <b>should</b> look like this</p>
  
  <p><code>$123,456,789.00</code><br />
  <code>$1,234.56</code><br />
  <code>$123.45</code></p>
  
  <p>Any answers need not be in actual code.  You don't have to spoon feed.  If there are c-related specifics which would be of help, please mention.  Else pseudo-code is fine.</p>
  
  <p>Thanks.</p>