Exercise: Number Base Conversion
Solve the following number conversion problems.
We'll cover the following...
Convert decimal to hex
Write a program to convert a decimal string into its equivalent hexadecimal. Assume that the input is already saved in a string named number
, and you are required to store the output to a string variable hexadecimal
.
number = 398hexadecimal = 18e
Converting decimal to hex
Hints
The process for converting a decimal number
...