cout: change formats
#include <iostream> using namespace std; int main() { // change formats cout.unsetf(ios::dec); cout.setf(ios::hex | ios::scientific); cout << 123.23 << " hello " << 100 << '\n'; cout.setf(ios::showpos); cout << 10 << ' ' << -10 << '\n'; cout. setf(ios::showpoint | ios::fixed); cout << 100.0; return 0; }