public class CurrencyConverter
public static double ConvertPoundsToCurrency(double pounds, string currency)
switch (currency.ToUpper())
throw new ArgumentException("Unsupported currency. Please choose USD, EUR, YEN, or YUAN.");
public static void Main(string[] args)
Console.WriteLine("Enter the amount in pounds: ");
double pounds = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Choose the target currency (USD, EUR, YEN, or YUAN): ");
string currency = Console.ReadLine();
double result = ConvertPoundsToCurrency(pounds, currency);
Console.WriteLine(pounds + " pounds is equivalent to " + result +" "+ currency);
catch (ArgumentException ex)
Console.WriteLine(ex.Message);