If you can use printf to output formated variable values to the standard output stream.
Example:
================
double dNum;
dNum = 123456.7890123
printf( "Real numbers:\n\t%f %.2f %e %E\n", dNum, dNum, dNum, dNum );
=====================
note: "%.2f" - formats a floating point number with two digits to the right of the decimal place.
You can get specifics on formating from the MSDN Library, just search on "Format Specification Fields: printf and wprintf Functions"