cout: number base, justification, and format flags
#include <iostream> using namespace std; int main() { cout.setf(ios::hex, ios::basefield); cout << 300; return 0; }