Have you tried searching google for your answer, search decimal to hex, and vice versa, you will find many, many answers on there. If you pay me I will write your code.
#include <iostream>
using namespace std;
int main(){
int userinputdec;
cout << "Please enter a number in decimal: ";
cin >> userinputdec;
cin.ignore();
cout << "The number in hex is: ";
cout << hex << uppercase << userinputdec << endl;
cout << "enter 1 to exit and any other key to continue: " ;
cin >> selection;
cin.ignore();
}
if this is what you're looking for
Added after 2 minutes:
OOOOPS sorry wrong code
i meant
Code:
int main(){
int userinputdec;
cout << "Please enter a number in decimal: ";
cin >> userinputdec;
cin.ignore();
cout << "The number in hex is: ";
cout << hex << uppercase << userinputdec << endl;
cin.get();
}