Home > Back-end >  Of new help! On the output of the floating point number
Of new help! On the output of the floating point number

Time:11-09

In c, please use % lf output exceeds 6 decimal places of decimals, why this output looks like
Code:
 
# include
Int main (void)
{
Printf (" % 10.1=20 lf \ n ", "
"10.1=% lf \ n"
"10.1=%. 5 lf \ n"
"0.1=%. 20 lf \ n"
, 10.1, 10.1, 10.1, 0.1);
return 0;
}

Output:
 
10.1=10.09999999999999964473
10.1=10.100000
10.1=10.10000
0.1=0.10000000000000000555
  • Related