/* ex_6_4.c++ */ #include #include using namespace std; string aff_hexa(int n) { ostringstream ost; ost << n << " = " ; ost.setf(ios::hex, ios::basefield); ost << n; return ost.str(); } int main (void) { cout << "Tapez un nombre :" << endl; int i; cin >> i; cout << aff_hexa(i) << endl; return 0; }