setprecision () prints the values from left to right. For the above code, first, it will take 4 digits and then prints one digit from fractional portion. setprecision can also be used to set the number of decimal places to be displayed. In order to do this task, you will have to set an ios flag within setf() manipulator. This may be used in two forms: fixed and
(i) fixed
(ii) scientific These two forms are used when the keywords fixed or scientific are appropriately used before the setprecision manipulator.