public class CurrencyConverter { public static void main(String[] args) { if (args.length != 1) { System.out.println("Please provide an amount in LKR as a command line argument."); return; } try { double amountInLKR = Double.parseDouble(args[0]); double exchangeRateDollar = 129.26; double exchangeRatePound = 132.74; double exchangeRateEuro = 206.36; double amountInDollar = amountInLKR / exchangeRateDollar; double amountInPound = amountInLKR / exchangeRatePound; double amountInEuro = amountInLKR / exchangeRateEuro; System.out.printf("%.2f LKR = %.4f$\n", amountInLKR, amountInDollar); System.out.printf("%.2f LKR = %.4f Pounds\n", amountInLKR, amountInPound); System.out.printf("%.2f LKR = %.4f Euros\n", amountInLKR, amountInEuro); } catch (NumberFormatException e) { System.out.println("Invalid amount. Please provide a numeric value."); } } }