• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
June 08, 2022 |350 Views

Decimal to Hexadecimal Conversion

  Share   Like
Description
Discussion

Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent hexadecimal number. i.e convert the number with base value 10 to base value 16.

Hexadecimal numbers uses 16 values to represent a number. Numbers from 0-9 are expressed by digits 0-9 and 10-15 are represented by characters from A – F.

Examples:  

Input : 116
Output: 74

Input : 10
Output: A

Input : 33
Output: 21

Decimal to Hexadecimal Conversion: https://www.geeksforgeeks.org/program-decimal-hexadecimal-conversion/