Question: 4. Write a program to convert an amount in UAE Dirhams to other currencies and vice versa. Your program should prompt the user to enter
4. Write a program to convert an amount in UAE Dirhams to other currencies and vice versa. Your program should prompt the user to enter an amount and two currency codes then convert the amount from the first currency to the second currency. The possible currency codes are AED (UAE Dirhams), USD (US Dollars), EUR (Euro) and KRW (Korean Won). Your program should display a menu of the available currencies then perform the conversion accordingly. Use the following conversion rates: 1 USD 3.67 AED 1 EUR 4.18 AED 1 KRW 0.0032 AED Sample Run#1: CURRENCY CONVERTER Available Currency Codes AED for UAE Dirhams USD for USD Dollars EUR for Euro KRW for Korean Won tx Enter an Amount: 200 Convert From: AED Convert To: USD 200.00 AED 54.50 USD BUILD SUCCESSFUL (total time: 9 seconds Sample Run #2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
