I am not that good of a coder, but I will try. By the way if this is a school assignment, you are missing out on learning by having other people do it.
Code:
#include <iostream>
#define FRANCS 0.6072
#define POUNDS 1.4320
#define YEN 0.0081
#define CDOLLARS 0.6556
#define EUROS 0.8923
using namespace std;
int menu();
void convertmoney(int amount, double type);
int main()
{
int money;
cout << "How much money to convert? ";
cin >> money;
int menuchoice;
menuchoice = menu();
switch(menuchoice)
{
case 1:
convertmoney(money, FRANCS);
break;
case 2:
convertmoney(money, POUNDS);
break;
case 3:
convertmoney(money, YEN);
break;
case 4:
convertmoney(money, CDOLLARS);
break;
case 5:
convertmoney(money, EUROS);
break;
default:
return 0;
break;
}
}
int menu()
{
cout << "Convert to what currency?" << endl;
cout << "[1] - Swiss Francs" << endl;
cout << "[2] - British Pounds" << endl;
cout << "[3] - Japanese Yen" << endl;
cout << "[4] - Canadian Dollars" << endl;
cout << "[5] - Euros" << endl;
int temp;
cin >> temp;
return temp;
}
void convertmoney(int amount, double type)
{
cout << "The amount is " << amount/type << endl;
}