Question
Write a program (with c only) to implement a simple currency converter program. Commands are as follows: Euro-US US-Euro Euro-Pound Pound-Euro Pound-US US-Pound showrates quit
Write a program (with c only) to implement a simple currency converter program. Commands are as follows:
Euro-US
US-Euro
Euro-Pound
Pound-Euro
Pound-US
US-Pound
showrates
quit
Note that the commands are EXACTLY as shown. Capital letters and lower case letters as shown. There is a very good reason for this requirement, as will become clear later in the semester.
Commands work as follows:
Euro-US
requests a currency amount in Euros
converts that into a currency amount in $US.
US-Euro
reverse the above; request an amount in $US, convert it into Euros
Euro-Pound, Pound-Euro
same thing for converting Pound Sterling to Euros and vice versa
Pound-US, US-Pound
same thing for converting Pound Sterling to $US and vice versa
showrates
shows the exchange rates used in an appropriate way
quit
exit the program
Use the following currency exchange rates (taken from Monday, August 26, 2013)
$1.0000 US = 0.74759 Euro
$1.0000 US = 0.64173 Pound Sterling
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