void Project1(){
unsigned short int x;
bool flag = false;
cout << "Enter an interger, I will reversed i.e. 301 --> 103" << endl;
cin >> x;
if ((x > 0) && (x <= 65535) ){
flag == true;
cout << reverse_num(x);
cout << endl;
}
else {
cout << "No conversion possible." << endl;
}
}
I having trouble when i enter a number out of the range of unsigned short int