I am going to create my first real(tiny) program.
It will be a hexadecimal converter and it can be used to convert a value between 0 and 255 to a hexadecimal value.
normal -- hex
7 -- 7
143 -- 8f
211 -- d3
255 -- ff
For examle: When a user inputs '211', the program should return a string containing 'd3'. The program will be used to convert
hexadecimals in order to get color values used by games like Warcraft 3. The user must enter 3 values between 255 and 0, so the program will return a 6 digits hexadecimal value.
User input: == Program returns:
255-155-55 == ff-9b-37
ONE way to do this, is by making a long, long IF statement (255)
in order to let the program return the desired value.
Due to my lack of programming experience I would like someone to tell me if there is a more efficient way..