std::cout.setf(std::ios_base::fixed, std::ios_base::floatfield); std::cout.precision(3); cout << "A:" << 0.1555 << endl; cout << "B:" << 0.155 << endl;