#include #include using namespace std; int main() { int num; cout << "Enter any integer: "; cin >> num; char hexDigits[] = "0123456789ABCDEF"; char result[9]; result[8] = '\0'; for (int i = 7; i >= 0; --i) { result[i] = hexDigits[num & 0xF]; num >>= 4; } cout << "Hexadecimal coversion: " << result << endl; return EXIT_SUCCESS; }