In embedded systems, you may need to transmit an integer value as a hexadecimal string over UART, display, or logs — but without using heavy standard functions like sprintf() or itoa().
Your task is to:
Example-1
Input: 255
Output: FF
Example-2
Input: 4095
Output: FFF
Example-3
Input: 0
Output: 0
Example-4
Input: 4660
Output: 1234
Input
255
Expected Output
FF