C Programming Tricks
How to prepare the output stream to print fixed precision numbers (3.40 instead of 3.4):
std::cout.setf(ios::fixed, ios::floatfield); std::cout.setf(ios::showpoint); std::cout.precision(2);