back to top

We are on

Shopping Cart
0 item(s)
Rp 0.00
Your Cart

Info

Untuk Pemesanan Bisa Melalui CALL/SMS/WA Alhamdulillah Sudah Terkirim +3.430 Peket (Dus) Ke Seluruh Indonesia dan 17 Paket ke Malaysia - 4 April 2020. Terima Kasih Atas Kunjungan dan Kepercayaannya

Contoh Program Array Java


import java.io.*;

public class latihcase
{

public static void main (String[]args)throws IOException

{
int kode;
double total;dropdown
double harga;
double jumlah;
double diskon;
double bayar;
int i;
int angka[]=new int [4];

BufferedReader br;
br=new BufferedReader(new InputStreamReader(System.in));

for(i=1; i<angka.length;i++)
{

angka[i]=i;
System.out.println("Data Ke "+angka[i]);
System.out.print("Masukan kode=");
kode=Integer.parseInt(br.readLine());

System.out.print("Masukan jumlah=");
jumlah=Integer.parseInt(br.readLine());

System.out.print("Masukan Diskon (%)=");
diskon=Integer.parseInt(br.readLine());


switch (kode)
{


case 1:

System.out.println("Buku");
harga=2000;
System.out.println("harga="+harga);
total=jumlah*harga;
System.out.println("total="+total);
bayar=(100-diskon)/100*total;
System.out.println("bayar="+bayar);


break;


case 2:


System.out.println("Pensil");
harga=3000;
System.out.println("harga="+harga);
total=jumlah*harga;
System.out.println("total="+total);
bayar=(100-diskon)/100*total;
System.out.println("bayar="+bayar);

break;

case 3:
System.out.println("Bolpoint");
harga=4000;
System.out.println("harga="+harga);
total=jumlah*harga;
System.out.println("total="+total);
bayar=(100-diskon)/100*total;
System.out.println("bayar="+bayar);
break;

default:


}

}
}
}

Description
Reviews

Pengiriman

Pengiriman
Untuk Grosir Pengirman Melalui Cargo dengan Biaya lebih Murah
0 item(s) in cart

bank acc

Copyright © 2017.
Mikki Books Allright reserved.
Template by Themelate
Modifed by Mikki Template
Proudly by Blogger
cart
0 items in cart