nama file : Input Data
tanggal : 22 nov 2011
programmer : Hendra Silaban
deskripsi : - Menginput Data
- Mengkonversi Rupiah Ke Mata Uang Asing
========================================================================*/import javax.swing.JOptionPane;
class Ekivalensi
{
public static void main(String[] args)
{
String RupiahS;
int Rupiah;
double Dollar;
double Yen;
double DM;
double FF;
int KursDollar = 8000;
int KursYen = 3000;
int KursDM = 2500;
int KursFF = 1700;
RupiahS = JOptionPane.showInputDialog("masukkan nilai Rupiah = ");
Rupiah = Integer.parseInt(RupiahS);
Dollar = Rupiah / KursDollar ;
Yen = Rupiah / KursYen ;
DM = Rupiah / KursDM ;
FF = Rupiah / KursFF ;
JOptionPane.showMessageDialog(null , "Dollar = " + Dollar +"$"+
"nYen = " + Yen +"Y"+
"nDM = " + DM +"D"+
"nFF = " + FF +"F");
}
}
Tidak ada komentar:
Posting Komentar