C++ Hexadecimal to Decimal Examples




C++ Hexadecimal to Decimal Examples

#include <iostream>

int main()
{
  int integer;
  std::cout<<"Entex Hex to Convert hex to decimal"<<std::endl;
  std::cin >> std::hex >> integer;
  std::cout << integer << std::endl;
  return 0;
}


Output

Entex Hex to Convert hex to decimal
10
16