/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nilairupiah;
/**
*
* @author acer
*/import java.util.Scanner;
public class Nilairupiah {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner (System.in);
System.out.print("masukkan nilai rupiah: ");
double rupiah, dolar, pound;
rupiah = input.nextDouble();
dolar = rupiah/10000;
pound = rupiah/15000;
System.out.println("dolar : "+dolar);
System.out.println ("pounds: "+pound);
}
}
*****************************************************************************
Nihh outputnya :
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nilairupiah;
/**
*
* @author acer
*/import java.util.Scanner;
public class Nilairupiah {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input = new Scanner (System.in);
System.out.print("masukkan nilai rupiah: ");
double rupiah, dolar, pound;
rupiah = input.nextDouble();
dolar = rupiah/10000;
pound = rupiah/15000;
System.out.println("dolar : "+dolar);
System.out.println ("pounds: "+pound);
}
}
*****************************************************************************
Nihh outputnya :