… contd. ...
Next, we declare variables to hold the amount to
be converted and the user’s choice of currency. We
can then ask the user for this information using
cin and cout.
float amount;
char choice;
cout << "enter the amount in punts:" ;
cin >> amount;
cout << "what currency? (d)ollar, (y)en, (e)uro or (s)terling? ";
cin >> choice;