A simple currency conversion utility.
Currency and exchange were important elements of trade in the ancient world, enabling people to buy and sell items like food, pottery, and raw materials. If a Greek coin held more gold than an Egyptian coin due to its size or content, then a merchant could barter fewer Greek gold coins for more Egyptian ones, or for more material goods. This is why, at some point in their history, most world currencies in circulation today had a value fixed to a specific quantity of a recognised standard like silver and gold.
Write a program that converts Great British Pounds (GBP) into Euro, Yuan or Yen.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram or selection statement to explain its purpose.
Enter the number of Great British Pounds: 200
Enter the currency (USD, Euro, Yuan, Yen): USD
200.0 GBP = 260.0 USD
Enter the number of Great British Pounds: 205
Enter the currency (USD, Euro, Yuan, Yen): Euro
205.0 GBP = 227.55 Euro
Use these resources as a reference to help you meet the success criteria.
Run the unit tests below to check that your program has met the success criteria.
Enter the number of Great British Pounds: 150
Enter the currency (USD, Euro, Yuan, Yen): USD
150.0 GBP = 195.0 USD
Enter the number of Great British Pounds: 130
Enter the currency (USD, Euro, Yuan, Yen): Yen
130.0 GBP = 17997.2 Yen
Enter the number of Great British Pounds: 301
Enter the currency (USD, Euro, Yuan, Yen): Euro
301.0 GBP = 334.11 Euro
Enter the number of Great British Pounds: 5
Enter the currency (USD, Euro, Yuan, Yen): Yuan
5.0 GBP = 44.6 Yuan
Check that you have: