• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

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.
0
troy24
Asked:
troy24
1 Solution
 
psdavisCommented:
char szOutput[ 50 ];
sprintf( szOutput, "%8.2f", fAmount );

Phillip
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now