Untitled

mail@pastecode.io avatar
unknown
java
2 years ago
1.6 kB
12
Indexable
Never
/******************************************************************************
The user will input a Philippine amount, then the said amount will be converted to different currencies
namely: US Dollar, Euro, Yuan, Koruna, Krone, Sheqel and Dinar

Sample run:
Enter Philippine peso: 43.33089
The amount's equivalent to:
US Dollar is  :  1.000
Euro : 0.734719
Yuan :  6.346934
Koruna : 18.77263
Krone : 5.449007
Sheqel : 3.726334
Dinar : 0.274588
Suppose,   1.000   US   Dollar   is   equivalent   to   Php.   43.33089,   0.734719Euro,   6.346934   Yuan,
18.77263 Koruna, 5.449007 Krone, 3.726334 Sheqel, and 0.274588 Dinar.

*******************************************************************************/

import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
	    Scanner in = new Scanner(System.in);
	    double usd,eur,yua,kor,kro,she,din;
	    
	    usd = 1.000;
	    eur = 0.734719;
	    yua = 6.346934;
	    kor = 18.77263;
	    kro = 5.449007;
	    she = 3.726334;
	    din = 0.274588;
	    
		System.out.print("Enter Philippine peso: ");
		double php = in.nextDouble();
		
		System.out.println("The amount is equivalent to: ");
		System.out.println("US Dollar is: " + (usd / php) * php );
	    System.out.println("Euro        : " + (eur / php) * php);
		System.out.println("Yuan        : " + (yua / php) * php);
		System.out.println("Koruna      : " + (kor / php) * php);
		System.out.println("Krone       : " + (kor / php) * php);
		System.out.println("Sheqel      : " + (she / php) * php);
		System.out.println("Dinar       : " + (din / php) * php);



		
	}
}