Just like my previous post, this program will do a currency conversion, only this time it's Euro to Philippine Peso.
import java.util.Scanner;
public class EuroToPeso {
public static void main(String[] args) {
double eurotopeso = 59.43;
double euro;
System.out.println("Enter amount in Euro:");
Scanner reader = new Scanner(System.in);
euro = reader.nextDouble();
double amountinpeso = euro*eurotopeso;
System.out.println("The value in Philippine Peso is: " +amountinpeso);
}
}
As you can see the items I changed are highlighted in yellow.
Here's the output:
import java.util.Scanner;
public class EuroToPeso {
public static void main(String[] args) {
double eurotopeso = 59.43;
double euro;
System.out.println("Enter amount in Euro:");
Scanner reader = new Scanner(System.in);
euro = reader.nextDouble();
double amountinpeso = euro*eurotopeso;
System.out.println("The value in Philippine Peso is: " +amountinpeso);
}
}
As you can see the items I changed are highlighted in yellow.
Here's the output:
Thx more
ReplyDeleteVery useful
ReplyDelete