建立一個程式，將一個十進位制數轉換為十六進位制數。 輸入：254
e, Here's a simple Python program to convert a decimal number to a hexadecimal number:

```python
def dec_to_hex(dec_num):
    # use the hex function to convert decimal to hexadecimal
    hex_num = hex(dec_num).split('x')[-1]
    return hex_num

dec_input = 254
result = dec_to_hex(dec_input)
print("The decimal number {} converted to hexadecimal is: {}".format(dec_input, result))
```

This will give you the output:
```sh
The decimal number 254 converted to hexadecimal is: fe
```