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.