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

```Binary = 100011011

The steps required for Binary to Hexadecimal Conversion are as follows:

1. Make sure the number of digits in binary number is divisible by 4. If not, add extra 0s in front.
2. Divide the binary number into pairs of 4-digit binary number.
3. Convert each 4-digit binary number pair to its Hexadecimal character.
4. Combine all the Hexadecimal characters and store into temporary variable as ‘Hexadecimal’.
5. Print the result.

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

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

/* Make sure the number of digits in 'Binary'
Number is divisible by 4. If not, add
required 0s in front*/
while(Binary.length() % 4 != 0)
{
Binary.insert(0,"0");
}

/* Converting each digit of Binary number
into 4-digit binary number pair and convert
each pair to its corresponding Hexadecimal
character
*/
for(int i = 0; i < Binary.length(); i=i+4)
{
string temp;
temp = temp + Binary[i];
temp = temp + Binary[i+1];
temp = temp + Binary[i+2];
temp = temp + Binary[i+3];
if(temp == "0000")
else if(temp == "0001")
else if(temp == "0010")
else if(temp == "0011")
else if(temp == "0100")
else if(temp == "0101")
else if(temp == "0110")
else if(temp == "0111")
else if(temp == "1000")
else if(temp == "1001")
else if(temp == "1010")
else if(temp == "1011")
else if(temp == "1100")
else if(temp == "1101")
else if(temp == "1110")
else if(temp == "1111")
}

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