#include <iostream> int main() { int val; std::cout << "Enter a number: "; std::cin >> val; std::cout << "This is your number: "; std::cout << std::hex << val; return 0; }
Enter a number: 1 This is your number: 1