1 2 3 4 5 6 7 8 9
|
// modify showbase flag
#include <iostream> // std::cout, std::showbase, std::noshowbase
int main () {
int n = 20;
std::cout << std::hex << std::showbase << n << '\n';
std::cout << std::hex << std::noshowbase << n << '\n';
return 0;
}
|