package nilai_tukar_rupiah;
import java.util.Scanner;
/**
*
* @author Fachrul Ilmawan
*/
public class Nilai_tukar_rupiah {
public static void main(String[] args) {
double nil_rupiah,nil_dolar,nil_euro, hasil_dol,hasil_eu;
Scanner masuk=new Scanner(System.in);
System.out.println("Program Mencari Nilai Tukar Rupiah \n pada JAVA ");
System.out.print("Masukan Nilai Rupiah : ");
nil_rupiah = masuk.nextDouble();
nil_dolar=12000;
nil_euro=15.783 ;
hasil_dol=nil_rupiah/nil_dolar;
hasil_eu=nil_rupiah/nil_euro;
System.out.println("Hasil Nilai Tukar Rupaiah Dengan Dolar = US$ "+String.format("%.2f",hasil_dol) );
System.out.println("Hasil Nilai Tukar Rupaiah Dengan Euro = € "+String.format("%.2f",hasil_eu) );
}
}
Komentar
Posting Komentar