Question: #include #include using namespace std; const int USD = 0 ; const int EUR = 1 ; const int GBP = 2 ; const int
#include
#include
using namespace std;
const int USD ;
const int EUR ;
const int GBP ;
const int INR ;
const int AUD ;
const int CAD ;
const int ZAR ;
const int NZD ;
const int JPY ;
Outputs a menu of currency types for user, returning a constant value
as defined above representing the selected currency.
int getUserSelection
int selection;
cout "Available currencies for conversion: endl;
cout Euros" endl;
cout Great Britan Pounds" endl;
cout Indian Rupees" endl;
cout Australian Dollars" endl;
cout Canadian Dollars" endl;
cout South African Rands" endl;
cout New Zealand Dollars" endl;
cout Japanese Zen" endl;
cout "Enter the number of the desired currency to convert: ;
cin selection;
return selection;
Converts the numeric type to a String representation.
Use this to output a String representation of the type.
string convertTypeToStringint type
switch type
case USD:
return US Dollars";
case EUR:
return "Euros";
case GBP:
return "Great Britan Pounds";
case INR:
return "Indian Rupees";
case AUD:
return "Australian Dollars";
case CAD:
return "Canadian Dollars";
case ZAR:
return "South African Rands";
case NZD:
return "New Zealand Dollars";
case JPY:
return "Japanese Zen";
return ;
int mainint argc, char argv
int userSelection getUserSelection;
string selectionAsAString convertTypeToStringuserSelection;
cout "You entered selectionAsAString endl;
cin.ignore;
cin.get;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
