Decimal to Hexadecimal Conversion” is a one of the classic programming problem exercise for beginners. Here, we are given a Decimal Number, entered by user and our task is to write a program to convert the given Decimal Number to its equivalent Hexadecimal Number.

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

```Decimal = 15
Decimal = 78

The steps required for decimal to hexadecimal conversion are as follows:

1. Initialize an empty string which will store hexadecimal number.
2. Store the remainder when the decimal number is divisible by 16.
3. If the remainder is less than 10, then convert the remainder number into character by (remainder + 48) and insert it to hexadecimal string at the front.
4. Else if the remainder is greater than 9, then convert the remainder number into character by (remainder + 55) and insert it to hexadecimal string at the front.
5. Divide the decimal number by 16.
6. Repeat the steps from 2 to 5 until decimal number is greater than 0.

#### C++ Program for Decimal to Hexadecimal Conversion is as follows:

```/* C++ Program for Decimal to Hexadecimal Conversion */
#include<bits/stdc++.h>
using namespace std;
int main()
{
/* Scan the Decimal Number */
int Decimal;
cout<<"Enter the Decimal Number: ";
cin>>Decimal;

/* Converting Decimal to Hexadecimal */
int temp = Decimal;
while(temp!=0)
{
int remainder = temp % 16;
if(remainder >=0 && remainder <=9)
{
char ch = remainder + 48;
}
else
{
char ch = remainder + 55;
}
temp = temp / 16;
}

/*Printing the result */
```OUTPUT: