Answers for "how to convert a decimal number to hexadecimal in c++"

C++
1

Convert a hexadecimal number into decimal c++

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int x;
    cin >>hex >> x;
    cout << x << endl;
    return 0;
}
Posted by: Guest on March-27-2021
0

int to hexadecimal in c++

#include <sstream>
std::stringstream sstream;
sstream << std::hex << my_integer;
std::string result = sstream.str();
Posted by: Guest on September-16-2020

Code answers related to "how to convert a decimal number to hexadecimal in c++"

Browse Popular Code Answers by Language