force output(dollar amounts)

I am working with dollar amounts and if the result end as $10.50 the result will only show 10.5 or it will only show 10 if the result is $10.00.  Please show me how to force the extra zeros at the end.
troy24Asked:
Who is Participating?
 
psdavisConnect With a Mentor Commented:
char szOutput[ 50 ];
sprintf( szOutput, "%8.2f", fAmount );

Phillip
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.