public static void main(String[] args) {
int diskon,merk,beli,nokia=1,samsung=2,nexian=3,lain=4,
harga1=100000,harga2=200000,harga3=300000,harga4=0;
merk=2;
beli=1;
diskon=10000;
if (merk==1)
{
System.out.println("Merk= Nokia");
System.out.println("Kartu= Mentari");
System.out.println("Harga= 10000");
System.out.println("Beli= "+beli);
System.out.println("Total= "+beli*harga1);
System.out.println("Diskon= "+diskon);
System.out.println("Total Bayar= "+(beli*harga1-diskon));
}
else if (merk==2)
{
System.out.println("Merk= Samsung");
System.out.println("Kartu= Telkomsel");
System.out.println("Harga= 20000");
System.out.println("Beli= "+beli);
System.out.println("Total= "+beli*harga2);
System.out.println("Diskon= "+diskon);
System.out.println("Total Bayar= "+(beli*harga2-diskon));
}
else if (merk==3)
{
System.out.println("Merk= Nexian");
System.out.println("Kartu= Axis");
System.out.println("Harga= 30000");
System.out.println("Beli= "+beli);
System.out.println("Total= "+beli*harga3);
System.out.println("Diskon= "+diskon);
System.out.println("Total Bayar= "+(beli*harga3-diskon));
}
else if (merk==4)
{
System.out.println("Merk= No Name");
System.out.println("Kartu= Speedy");
System.out.println("Harga= Goceng");
System.out.println("Beli= "+beli);
System.out.println("Total= "+beli*harga4);
System.out.println("Diskon= "+diskon);
System.out.println("Total Bayar= "+(beli*harga4-diskon));
}
}}
Jumat, 21 Oktober 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar