hows about a hex to decimal converter..


eg:

#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

int main( void )
{
string prompt = "Enter a hex value to convert, 0 to exit\n>";
int val;

do
{
cout << prompt;
cin >> hex >> val;
cout << "\n" << hex << val << " -> " << dec << val << "\n";
} while( val );

return 0;
}