import java.util.*;
public class CurrencyConverter {
public static void main(String[] args) {
double USD=43.75, GBP=78.98, EUR=56.45, JPY=0.867;
double USDmoney=0,GBPmoney=0,EURmoney=0,JPYmoney=0;
int Pmoney;
Scanner in = new Scanner(System.in);
System.out.println("Enter currency:");
Pmoney = in.nextInt();
USDmoney = Pmoney* USD;
GBPmoney = Pmoney * GBP;
EURmoney = Pmoney * EUR;
JPYmoney = Pmoney* JPY;
System.out.println("Peso to USD:" + USDmoney + "\n Peso to GBP:" + GBP + "\nPeso to EUR:" +
EURmoney + "\n Peso to JPY:" + JPYmoney);
}
}
No comments:
Post a Comment