Kamis, 13 September 2018

Membuat Nota Pembayaran dengan Program


Hasil gambar untuk nota

Hallo gays, kemaren banyak nih pertanyaan dan permintaan yang masuk ke gmail aku, banyak yang minta untuk kasih tau gimana sih program untuk pembuatan nota itu. Nah, dipostingan aku kali ini, aku akan kasih tau, kasih satu program contoh gimana sih bikin nota itu. Langsung aja yuk simak :

import java.io.*;

public class blog
{
                public static void main ( String [] args ) throws IOException
                {
                                System.out.print (" ===================================== ");
                                System.out.print ("       NOTA PEMBAYARAN SEWA KAMAR ");
                                System.out.print (" ===================================== ");
                               
                                BufferedReader br;
                                br = new BufferedReader ( new InputStreamReader ( System.in));
                                String nama, alamat;
                                int kode, harga, lamasewa, sewa;
                                int biaya = 0;
                                                System.out.print (" NAMA PENYEWA    :");
                                                nama = ( br.readLine());
                                                System.out.print (" ALAMAT PENYEWA  :");
                                                alamat = ( br.readLine());
                                                System.out.print ("KODE SPANDUK                        :");
                                                kode = Integer.parseInt ( br.readLine());
                                                switch ( kode )
                                {
                                                case 1 : System.out.println ("JENIS SPANDUK    : MINI ");
                                                                harga = 170000;
                                                                break;
                                                case 2 : System.out.println ("JENIS SPANDUK    : DOUBLE ");
                                                                harga = 310000;
                                                                break;
                                                case 3 : System.out.println ("JENIS SPANDUK    : JUMBO ");
                                                                harga = 550000;
                                                                break;
                                                }
                                                System.out.print (" BIAYA SEWA PER MINGGU                 :" +harga);
                                                harga = Integer.parseInt(br.readLine());              
                                                System.out.println (" LAMA SEWA                                          :");
                                                lamasewa = Integer.parseInt(br.readLine());
                                                sewa = harga*lamasewa;;
                                                                System.out.println (" BAYAR                                                                     :" +sewa);
}
}

Selamat mencoba semuanya.. Kalau ada masalah silahkan komen di bawah yaa... J

0 komentar:

Posting Komentar