The answer is still valid,
Puts your floating point number into the output buffer as a string of the number to two decimal places.Code:printf("%.2f", f);
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 5 of 5
Thread: Output formattingThreaded View
|
Click Here to Expand Forum to Full Width |