Formatting in printf, in C

You can control the number of digits after the decimal point when printing a floating point value using printf.

For example,
printf("The value is %10.6lf",myDoubleNum);
causes the double precision value in the variable myDoubleNum to be printed out using 10 characters including the decimal point, with 6 number characters following the decimal point.
Recall that the lf coming after the 10.6 stands for long float, or double precision.
This leaves 3 characters allowed before the decimal point. If the value is less than one thousand, the leading characters will be blanks.
If the value is greater than 1000, the value will be printed and the formatting will be overridden.
For example:
   6.243512
 28.873530
254562.254345


So if you want more precision shown, add more values in the format control, such as 15.10. 15 total including the decimal point with 10 number characters following the decimal point.