Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This program allows the user to calculate the amount of money he or she will be given when travelling between countries. You can download some
This program allows the user to calculate the amount of money he or she will be given when travelling between countries.
You can download some current exchange rates from:
mdaltonPublicexchange txt
The file has the following format.
CurrencyAbbreviation CurrencyName AmountForEachUS USD USDollar EUR Euro GBP BritishPound CAD CanadianDollar dots In addition, every exchange will cost of the mopey to be exchanged.
Your program will have two menus:
Enter the abbreviation for your current currency.
USD
EUR
CAD
AUD JPY
INR
CHF ZAR
ZAR HKD
SEK
MXN
Which do you choose?
And
Enter the abbreviation for your new currency.
USD
GBP
All inputs must be validated.
Write a function called exchange that takes two arrays and an amount of money. This function returns the amount after the exchange charge and then applies the exchange rate
Suggestion: Subtract the exchange charge, then convert to USD, then convert to the desired currency
Sample Run:
Enter the abbreviation for your current currency.
USD
GBP
CAD
AUD JPY
INR
CHF
ZAR HKD
SEK
DKK
Which do you choose? GBP
Enter the abbreviation for your new currency.
USD
GBP
CAD
JPY
INR
ZAR
HKD SEK
MXN
DKK
Which do you choose? CAD
Enter the amount to exchange:
You get: CanadianDollars
Write a function called loadArrays that takes three arrays as parameters. This function opens an input file to get the current exchange rates.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started