By default, the floating numbers are printed with six digits after the decimal point. However, we can specify the number of digits to be displayed after the decimal point while printing the floating point numbers. This can be done by using the
precision() member function as follows:
Whereis the number of digits to the right of the decimal point. For example, the
statements:
cout.precision(3);
cout