...

/

Exercise: Number Base Conversion

Exercise: Number Base Conversion

Solve the following number conversion problems.

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 = 398
hexadecimal = 18e
Converting decimal to hex

Hints

  • The process for converting a decimal number 428428 ...