Here instead of using %d we make use of %f for float values. By default float shows 4 digits after the decimal point. To limit the number of digits after the decimal point we make use of %.3f.
Here .3 means 3 values after the decimal point. Hence we can make use of values 0, 1, 2, 3 or 4 only as 4 is the upper limit and negative values are not allowed obviously.

This is all there is to be learned about float, using the three steps specified above. The next chapter will show how we can make use of both integer and float values along with mathematical operators.