#include using namespace std; void f(double x) { cout << "x = " << x << '\n'; } int main() { double x = 3.46512; double y = 4.523; f(x); f(y); int capture; ios_base::fmtflags cap2; capture = cout.precision(); cout << "capture = " << capture << '\n'; cap2 = cout.flags(); cout.precision(2); cout << fixed; f(x); f(y); cout.precision(capture); cout.flags(cap2); f(x); f(y); }