#B2021. Round Float to Three Decimal Places
Round Float to Three Decimal Places
Round Float to Three Decimal Places
Given a single precision floating-point number, output the number rounded to 3 decimal places.
Mathematically, if the input is x
, then the output should be \(\text{round}(x, 3)\)
.
Note: There is no need to consider floating point errors.
inputFormat
The input consists of a single line containing one single precision floating-point number.
outputFormat
Output the input number rounded to 3 decimal places.
sample
3.1415926
3.142