i just need to be able to convert a (maximum) 3 digit decimal number to hex

Is this the best way to do it, or is there a simple way that i dont see?
(excluding any built in hex functionality for...