TpC0GUO0GfMlBUd6TfW5BUOoBA==
Skip to main content



BORLAND C++ (MEMBUAT KASIR RUMAH MAKAN )
STMIK AMIKOM YOGYAKARTA
Dosen : ERNI SENIWATI, S. Kom
12. s1si 06

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main()
{
int Pilihan;
double P,np,Tot,etj,aj,kem,b,ed;
clrscr();

cout<<"  +-------------------------------------------------------------------------+"<<endl;
cout<<"  |                                                                         |"<<endl;
cout<<"  |        *********** Selamat Datang Di 'R.M JAMBRONG STYLE' ***********   |"<<endl;
cout<<"  |                       Sigit Septianto   12.12.S1Si 06                   |"<<endl;
cout<<"  |                                                                         |"<<endl;
cout<<"  +-------------------------------------------------------------------------+"<<endl;
cout<<"  |______                                                             ______|"<<endl;
cout<<"         |______                                               ______|"<<endl;
cout<<"                |_______                                ______|"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |       >>>>> daftar menu <<<<<    |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |        1. Paket 'RELAXE'         |"<<endl;
cout<<"                      |        2. Paket 'NICE'           |"<<endl;
cout<<"                      |        3. Paket 'OWH SHIIIT'     |"<<endl;
cout<<"                      |        4. Paket 'OWH MY GOD'     |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                        Masukkan Menu Makanan : ";cin>>Pilihan;
cout<<endl;
cout<<endl;

switch(Pilihan)
{
case 1:
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Paket 'RELAXE'             |"<<endl;
cout<<"                      |        Harga : Rp 20.000          |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Isi Menu paket ' RELAXE '  |" <<endl;
cout<<"                      |        mie dogy                   |"<<endl;
cout<<"                      |        Stick Ayam                 |"<<endl;
cout<<"                      |        Sosis Goreng               |"<<endl;
cout<<"                      |        SoftDrink                  |"<<endl;
cout<<"                      +___________________________________+"<<endl;
cout<<endl;
cout<<"                              Berapa Porsi : ";
cin>>P;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
clrscr();

cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(20000*P)+((2000*np)+(2000*etj)+(5000*aj));
cout<<"                            Total = Rp "<<Tot<<endl;
cout<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  |Anda ingin tambah ketik '0'jika tidak nambah masukan 'uang anda'dibawah ini|"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<endl;
cout<<endl;
cout<<"                             uang bayar anda :Rp ";
cin>>b;
kem=b-Tot;
cout<<"                             kembali         :Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;

int Tambahan;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      | >>>>> daftar menu Tambahan <<<<< |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |        1.Nasi Putih              |"<<endl;
cout<<"                      |        2.Es Jeruk                |"<<endl;
cout<<"                      |        3.Aneka Jus               |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                       Pilih Menu Tambahan( Tekan 1/2/3 ) : ";cin>>Tambahan;
switch(Tambahan)
{
case 1:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      >>>>> Nasi Putih <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      Harga : Rp 2.000            |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>np;
break;

case 2:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |       >>>>> Es Jeruk <<<<<       |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp2.000          |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>etj;
break;

case 3:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         >>>>> Jus <<<<<          |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 5.000         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>aj;
break;

}
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(20000*P)+((2000*np)+(2000*etj)+(5000*aj));
cout<<"                                Total           : Rp "<<Tot<<endl;
cout<<"                                uang Bayar anda : Rp ";
cin>>b;
kem=b-Tot;
cout<<endl;
cout<<"                                =========================="<<endl;
cout<<"                                kembalian       : Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"     ***** Terima Kasih Telah Mengunjungi Rumah Makan 'JAMBRONG STYLE *****"<<endl;
cout<<"    <======================================================================>"<<endl;
break;


case 2:
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Paket 'NICE'               |"<<endl;
cout<<"                      |        Harga : Rp 35.000          |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Isi Menu Paket 'NICE'      |" <<endl;
cout<<"                      |        Udang Bakar Madu           |"<<endl;
cout<<"                      |        Gurame Goreng Tepung       |"<<endl;
cout<<"                      |        Sup Cumi                   |"<<endl;
cout<<"                      |        Jus Buah                   |"<<endl;
cout<<"                      +___________________________________+"<<endl;
cout<<endl;
cout<<"                              Berapa Porsi : ";
cin>>P;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
clrscr();

cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(35000*P)+((2000*np)+(2000*etj)+(5000*aj));
cout<<"                            Total = Rp "<<Tot<<endl;
cout<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  |Anda ingin tambah ketik '0'jika tidak nambah masukan 'uang anda'dibawah ini|"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<endl;
cout<<endl;
cout<<"                             uang bayar anda :Rp ";
cin>>b;
kem=b-Tot;
cout<<"                             kembali         :Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;

int Tamb;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      | >>>>> daftar menu Tambahan <<<<< |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |        1.Nasi Putih              |"<<endl;
cout<<"                      |        2.Milk Shake Float Coklat |"<<endl;
cout<<"                      |        3.Pudding Mangga          |"<<endl;
cout<<"                      |        4.Es Crim Durian          |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                       Pilih Menu Tambahan( Tekan 1/2/3 ) : ";cin>>Tamb;
switch(Tamb)
{
case 1:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      >>>>> Nasi Putih <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      Harga : Rp 2.000            |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>np;
break;

case 2:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |>>>>>Milk Shake Float Coklat <<<<<|"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 7.000          |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>etj;
break;

case 3:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |     >>>>> Pudding Mangga <<<<<   |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 8.000         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>aj;
break;

case 4:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |       >>>>> Es Crim <<<<<        |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 5.000         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>ed;
break;

}
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(35000*P)+((2000*np)+(7000*etj)+(8000*aj)+(5000*ed));
cout<<"                                Total           : Rp "<<Tot<<endl;
cout<<"                                uang Bayar anda : Rp ";
cin>>b;
kem=b-Tot;
cout<<endl;
cout<<"                                =========================="<<endl;
cout<<"                                kembalian       : Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"     ***** Terima Kasih Telah Mengunjungi Rumah Makan 'JAMBRONG STYLE *****"<<endl;
cout<<"    <======================================================================>"<<endl;
break;

case 3:
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Paket 'OWH SHIITT'         |"<<endl;
cout<<"                      |        Harga : Rp 25.000          |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |     Isi Menu Paket 'OWH SHIITT'   |" <<endl;
cout<<"                      |        Gurame Setan               |"<<endl;
cout<<"                      |        Sambal Neraka              |"<<endl;
cout<<"                      |        Kerupuk Jambrong           |"<<endl;
cout<<"                      |        Darah Dingin               |"<<endl;
cout<<"                      +___________________________________+"<<endl;
cout<<endl;
cout<<"                              Berapa Porsi : ";
cin>>P;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
clrscr();

cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(25000*P)+((2000*np)+(2000*etj)+(5000*aj));
cout<<"                            Total = Rp "<<Tot<<endl;
cout<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  |Anda ingin tambah ketik '0'jika tidak nambah masukan 'uang anda'dibawah ini|"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<endl;
cout<<endl;
cout<<"                             uang bayar anda :Rp ";
cin>>b;
kem=b-Tot;
cout<<"                             kembali         :Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;

int Tamba;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      | >>>>> daftar menu Tambahan <<<<< |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |        1.Nasi Putih              |"<<endl;
cout<<"                      |        2.Es Kelapa Muda          |"<<endl;
cout<<"                      |        3.Pisang Bakar            |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                       Pilih Menu Tambahan( Tekan 1/2/3 ) : ";cin>>Tamba;
switch(Tamba)
{
case 1:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      >>>>> Nasi Putih <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      Harga : Rp 2.000            |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>np;
break;

case 2:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |   >>>>> Es Kelapa Muda  <<<<<    |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 3.000         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>etj;
break;

case 3:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |    >>>>> Pisang Bakar <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 4.500         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>aj;
break;

}
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(25000*P)+((2000*np)+(3000*etj)+(4500*aj));
cout<<"                                Total           : Rp "<<Tot<<endl;
cout<<"                                uang Bayar anda : Rp ";
cin>>b;
kem=b-Tot;
cout<<endl;
cout<<"                                ==========================="<<endl;
cout<<"                                kembalian       : Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"     ***** Terima Kasih Telah Mengunjungi Rumah Makan 'JAMBRONG STYLE *****"<<endl;
cout<<"    <======================================================================>"<<endl;
break;
case 4:
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |        Paket 'Owh My God'         |"<<endl;
cout<<"                      |        Harga : Rp 40.000          |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |     Isi Menu Paket 'Owh My God'   |" <<endl;
cout<<"                      |        Kepiting Bakar Manis       |"<<endl;
cout<<"                      |        Stick                      |"<<endl;
cout<<"                      |        Cumi Goreng Mayonice       |"<<endl;
cout<<"                      |        Smoothy                    |"<<endl;
cout<<"                      +___________________________________+"<<endl;
cout<<endl;
cout<<"                              Berapa Porsi : ";
cin>>P;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
clrscr();

cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(40000*P)+((2000*np)+(2000*etj)+(5000*aj));
cout<<"                            Total = Rp "<<Tot<<endl;
cout<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  |Anda ingin tambah ketik '0'jika tidak nambah masukan 'uang anda'dibawah ini|"<<endl;
cout<<"  |                                                                           |"<<endl;
cout<<"  +---------------------------------------------------------------------------+"<<endl;
cout<<endl;
cout<<endl;
cout<<"                             uang bayar anda :Rp ";
cin>>b;
kem=b-Tot;
cout<<"                             kembali         :Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;

int Tambah;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      | >>>>> daftar menu Tambahan <<<<< |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |        1.Nasi Putih              |"<<endl;
cout<<"                      |        2.Kentang Goreng          |"<<endl;
cout<<"                      |        3.Chake Durian            |"<<endl;
cout<<"                      |        4. Soda Gembira           |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                       Pilih Menu Tambahan( Tekan 1/2/3 ) : ";cin>>Tambah;
switch(Tambah)
{
case 1:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      >>>>> Nasi Putih <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      Harga : Rp 2.000            |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>np;
break;

case 2:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |    >>>>> Kentang Goreng <<<<<     |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 3.500          |"<<endl;
cout<<"                      +-----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";cin>>etj;
break;

case 3:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |      >>>>> Chake Durian <<<<<    |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 15.000        |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>aj;
break;

case 4:
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |    >>>>> Soda Gembira <<<<<      |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<"                      |         Harga : Rp 3.500         |"<<endl;
cout<<"                      +----------------------------------+"<<endl;
cout<<endl;
cout<<"                                Berapa Porsi : ";
cin>>aj;
break;
}
cout<<endl;
cout<<endl;
cout<<endl;
Tot=(40000*P)+((2000*np)+(3500*etj)+(15000*aj)+(3500*ed));
cout<<"                                Total           : Rp "<<Tot<<endl;
cout<<"                                uang Bayar anda : Rp ";
cin>>b;
kem=b-Tot;
cout<<endl;
cout<<"                                =========================="<<endl;
cout<<"                                kembalian       : Rp "<<kem<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"     ***** Terima Kasih Telah Mengunjungi Rumah Makan 'JAMBRONG STYLE *****"<<endl;
cout<<"    <======================================================================>"<<endl;
break;
default :
break;
}
getch();
}


Copy kode diatas, lalu paste di Borland c++ ,, saya sendiri yang buat SIGIT SEPTIANTO dan lihat hasilnya,.,. oh ya bahasa biasa serta flowchartnya buat sendiri ya,., J
Nih hasilnya saya tampilin:
 



















Tampilan Pertama ,    Coba anda masukan menu makanan, contoh ketik no 2

                             lalu akan muncul daftar harga paket no 2 yaitu paket nice dan disuruh masukan berapa porsi anda pesan,
ketik saja sesuka anda.. sebagai contoh ketik 5
 











lalu keluar total… dan ada pemberitahuan . jika mau tamba ketik 0 jika tidak masukan uang
lalu tekan enter tampilanya sebagai berikut:


















coba kita ketik 3 lalu enter





l
lalu ketik 5 dan enter akan muncul total, kembalian dan uang bayar ..


selamat mencoba ya  :)    Buat adek kelas

0

0 Comments for " "

Related Post

Lorem ipsum madolor sit amet, consectetur adipisicing elit.

Click on one of our representatives below to chat on WhatsApp

img
Customer Service Nina Lawson
6281234567891
img
Billing Albert Henderson
6281977094282
img
Support Sufiya Elija
6281977094283
img
Support Pabelo Mukrani
6281977094284
img
Sales Laila Lan
6281977094285
We run on Goomsite.Net
Hello! What can I do for you?

Need help? Let's chat with us!

Added Successfully