#include <iostream>
using namespace std;
void flagstatus()
{
ios::fmtflags f;
f = cout.flags();
f & ios::boolalpha ? cout << "boolalpha on\n" : cout << "boolalpha off\n";
f & ios::left ? cout << "left on\n" : cout << "left off\n";
f & ios::right ? cout << "right on\n" : cout << "right off\n";
f & ios::dec ? cout << "dec on\n" : cout << "dec off\n";
f & ios::oct ? cout << "oct on\n" : cout << "oct off\n";
f & ios::hex ? cout << "hex on\n" : cout << "hex off\n";
f & ios::showbase ? cout << "showbase on\n" : cout << "showbase off\n";
f & ios::showpoint ? cout << "showpiont on\n" : cout << "showpoint off\n";
f & ios::internal ? cout << "internal on\n" : cout << "internal off\n";
f & ios::skipws ? cout << "skipws on\n" : cout << "skipws off\n";
f & ios::showpos ? cout << "showpos on\n" : cout << "showpos off\n";
f & ios::uppercase ? cout << "uppercase on\n" : cout << "uppercase off\n";
f & ios::scientific ? cout << "scientific on\n": cout << "scientific off\n";
f & ios::fixed ? cout << "fixed on\n" : cout << "fixed off\n";
f & ios::unitbuf ? cout << "unitbuf on\n" : cout << "unitbuf off\n";
cout << endl;
}
int main()
{
cout.setf(ios::hex | ios::left | ios::fixed);
flagstatus();
return 0;
}
/*
run:
boolalpha off
left on
right off
dec on
oct off
hex on
showbase off
showpoint off
internal off
skipws on
showpos off
uppercase off
scientific off
fixed on
unitbuf off
*/