public static void main(String[] args) {
Scanner in = new Scanner (System.in);
String nama, kode;
float inap, obat, infus;
float jml_inap, jml_obat, jml_infus, total;
System.out.print("Nama Pasien\t:");
nama = in.nextLine();
System.out.print("Kode Pasien\t:");
kode = in.nextLine();
System.out.print("Jumlah Menginap (hari)\t:");
inap = in.nextFloat();
System.out.print("Jumlah Obat\t:");
obat = in.nextFloat();
System.out.print("Jumlah Infus\t:");
infus = in.nextFloat();
jml_inap = inap * 500000;
jml_obat = obat * 100000;
jml_infus = infus * 50000;
total = jml_inap + jml_obat + jml_infus;
System.out.print("Biaya Rawat Inap:");
System.out.print(jml_inap);
System.out.print("\nBiaya Obat\t:");
System.out.print(jml_obat);
System.out.print("\nBiaya Infus\t:");
System.out.print(jml_infus);
System.out.print("\nTotal\t\t:");
System.out.print(total);
// TODO code application logic here
}
}
Minggu, 06 Oktober 2013
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar