how to withhold the digit of decimal fraction?
Posted: Wed Feb 18, 2004 10:36 am
My english is not good,so i don't know how to say,is it use "withhold"?i mean
a=12.33342,b=1.3321
if i want to withhold the 2 two digits of the decimal fraction
i wanna output a=12.33,b=1.33
so is there any function in cout can control it?just like cout.precision(),which can control the decimal fraction's valid digits?
a=12.33342,b=1.3321
if i want to withhold the 2 two digits of the decimal fraction
i wanna output a=12.33,b=1.33
so is there any function in cout can control it?just like cout.precision(),which can control the decimal fraction's valid digits?