Posted by Materi Teknik Informatika • Informasi Teknologi Informasi • Digital Marketing on 9/22/2014
import java.util.Scanner;
public class Soal_202 {
public static void main(String[] args) {
Scanner masukan = new Scanner(System.in);
float rupiah, dolar, euro;
System.out.print("Masukan Rupiah = ");
rupiah = masukan.nextFloat();
dolar = (float) (rupiah*0.0001);
euro = (float) (rupiah*0.00004);
System.out.println();
System.out.println("Hasil Kurs = ");
System.out.println("Dolar = " + dolar);
System.out.println("Euro = " + euro);
}
}
Berikut hasil output Program Konversi Nilai Mata Uang yang dihasilkan.