Output Hexadecimal with lowercase base : Hexadecimal « Data Type « C++






Output Hexadecimal with lowercase base

  
#include <iomanip>
#include <iostream>

using namespace std;

int main( )
{
   cout << "Enter a hexadecimal number: ";
   int num;
   cin >> hex >> num;

   cout << "\nDecimal: " << num
        << "\nHexadecimal with lowercase base: " << nouppercase << num;

}
  
    
  








Related examples in the same category

1.Display hexadecimal integer literals and decimal integer literals.
2.Output Hexadecimal default
3.Output Hexadecimal without base
4.Output Hexadecimal with uppercase base
5.Output digits in hex and octOutput digits in hex and oct
6.gain access to cout, cin, and hexgain access to cout, cin, and hex
7.Reads integral decimal values and generates octal, decimal, and hexadecimal output
8.Enter hexadecimal digits and a floating-point numberEnter hexadecimal digits and a floating-point number
9.Set cout to output hex number
10.Display hexadecimal value as decimal value