I am reading through an old school (1990) book on C and they have a number formatting in it which loops like this:
...
...
printf("%3.1f %15.10f\n",x, x*x+x+1/x);
In the book it says that it
%m.kf
Converts a value of type float (or double) tom
decimal positions withk
digits after the period.
After playing around with this I am still completely baffled.
I played around with this. http://cstub.com/196059842/
#include <stdio.h>
int main( int argc, const char* argv[] )
{
double f = 1.55568;
printf("%10.12f",f);
}
1.555680824083
10
part do then (%10.12
)?