For a program I'm writing I only need two digits past the decimal.I was a c programmer and the way I would have done this was
printf("%2f",variable);
Is there anything like this in cout?
setprecision()