The Ministry of Commerce needs a program that converts foreign currencies from and to Qatari Riyals.

social sciences

Description

In 2022, the football fans will come to Qatar bringing their foreign currencies. The Ministry of Commerce needs a program that converts foreign currencies from and to Qatari Riyals.

1.1 From foreign currencies to Qatari Riyal [2.5 points]

Write a function toQAR(amount, currency) that takes an amount (number) and a foreign currency (string) as arguments and returns the corresponding amount in Qatari Riyal (as a number)).

• amount is the amount in the foreign currency.
• currency can be either "USD", "CYN", "EURO" and 2 other currency codes of your choice.


Related Questions in social sciences category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.