#include #include using namespace std; int main() { for (;;) { //infinite loop, until we break out of it below cout << "Please type an integer in decimal: "; int i {0}; cin >> i; if (!cin) { //If the user typed something other than an int, break; //out of the for loop } cout << dec << i << " in decimal is " << uppercase << hex << i << " in hexadecimal.\n\n"; } return EXIT_SUCCESS; //Arrive here when we break out of the loop. }