sitedial.blogg.se

Real time currency converter in java
Real time currency converter in java







( "%s" + input + " at a conversion rate of " + yen_dollar_rate + " Yen to %s = %.2f\n", (char)yen_sym, us_dollar, rate) ( "%s" + input + " at a conversion rate of " + pound_yen_rate + " Pounds to %s = %.2f\n", (char)pound_sym, yen, rate) ( "%s" + input + " at a conversion rate of " + pound_euro_rate + " Pounds to %s = %.2f\n", (char)pound_sym, euro, rate) ( "%s" + input + " at a conversion rate of " + pound_dollar_rate + " Pounds to %s = %.2f\n", (char)pound_sym, us_dollar, rate) ( "%s" + input + " at a conversion rate of " + euro_yen_rate + " Euros to %s = %.2f\n", (char)euro_sym, yen, rate)

real time currency converter in java

( "%s" + input + " at a conversion rate of " + euro_pound_rate + " Euros to %s = %.2f\n", (char)euro_sym, pound, rate) ( "%s" + input + " at a conversion rate of " + euro_dollar_rate + " Euros to %s = %.2f\n", (char)euro_sym, us_dollar, rate) ( "%s" + input + " at a conversion rate of " + dollar_yen_rate + " Dollars to %s = %.2f\n", (char)us_dollar_sym, yen, rate) ( "%s" + input + " at a conversion rate of " + dollar_pound_rate + " Dollars to %s = %.2f\n", (char)us_dollar_sym, pound, rate) ( "%s" + input + " at a conversion rate of " + dollar_euro_rate + " Dollars to %s = %.2f\n", (char)us_dollar_sym, euro, rate) ("Please restart the program & enter a number from the list.") ("Please choose the input currency:") Ĭase 1: inType = "US Dollars > " + us_dollar_sym break Ĭase 2: inType = "Euros > " + euro_sym break Ĭase 3: inType = "British Pounds > " + pound_sym break Ĭase 4: inType = "Japanese Yen > " + yen_sym break

real time currency converter in java real time currency converter in java

("Use the following codes to input your currency choices: \n 1 - US dollars \n 2 - Euros \n 3 - British Pounds \n 4 - Japanese Yen \n") ("Welcome to the Currency Converter Program \n") It seems quite long and looks like a huge mess. It works, but I was curious to know if I did it in the most efficient way possible. I'm supposed to be able to convert between Yen, Dollars, Pounds and Euros using static rates. This is my basic currency converter for my intro to Java class.









Real time currency converter in java