:: Link Exchange ::

MAGGOTACE.blogspot.com

Program Kasir Sexy Sederhana ^^ C++


          Saya masih mempelajari Bahasa C++. Jadi, jika dapat ilmu baru, maka sebaiknya kita bagi-bagi. Akan lebih berkah. hahaha.. :D Langsung aja nih.. Kode C++ yang saya buat untuk Program Kasir. Menggunakan struct, array, perulangan, percabangan, fungsi, prosedure, apa lagi yaa.. langsung cekidot aja deh.. nih :P haha

//syntaks program kasir sederhana
#include

using namespace std;



struct KOTAK{
char nama[1000];
int harga;
};

struct SIMPAN{
int XY;
};

int ZZ, pilihan;
typedef KOTAK BOX[1000];

void inputData(BOX &ZOOM){
    int j=0;
    SIMPAN CC[1];
    cout<    cout<<"======================================>>>"<    cout<<"**  Masukkan jumlah Barang / Item : ";cin>>CC[0].XY;
    cout<<"======================================>>>"<
    ZZ=CC[0].XY;

    for(int i=0; i    cout<<"**  Masukkan Pembelian ke-"<    cout<<"================================="<    cout<<">>  Nama Barang   : ";cin>>ZOOM[i].nama;
    cout<<">>  Harga Barang  : Rp. ";cin>>ZOOM[i].harga;
    cout<<"================================="<    j++;}
}

void tampilData(BOX &ZOOM){

    SIMPAN CC[1];
    CC[0].XY=ZZ;
    int j=0;

    cout<    cout<<"======================================>>>"<    cout<<"================================="<    for (int i=0; i    cout<<"**  Barang atau Item ke-"<    cout<<"================================="<    cout<<">>  Nama Barang   : "<    cout<<">>  Harga Barang  : Rp. "<    cout<<"================================="<    j++;
    }
}

void hitungTransaksi(BOX &ZOOM){

    SIMPAN CC[1];
    CC[0].XY=ZZ;
    int bayar=0;

    for (int i=0; i        bayar=bayar + ZOOM[i].harga;
        }
    cout<    cout<<"======================================>>>>>"<    cout<<"Jumlah Pembayaran Transaksi : Rp. "<    cout<<"======================================>>>>>"<}

int main()
{
     cout<<"\t\t=====[[ PROGRAM KASIR SEDERHANA ]]====="<     cout<<"\t\t  ======= twitter : @aldybear ======="<
cout<<"_______-?Sex,"<cout<<"____y?Sexy?Sex"<cout<<"___?Sexy?Sexy?R"<cout<<"___?Sexy?Sexy?R"<cout<<"__?Sexy?Sexy?Se"<cout<<"_?Sexy?Sexy?Se"<cout<<"_?Sexy?Sexy?Se"<cout<<"_?Sexy?Sexy?Sexy?"<cout<<"?Sexy?Sexy?Sexy?Sexy"<cout<<"?Sexy?Sexy?Sexy?Sexy?Se"<cout<<"?Sexy?Sexy?Sexy?Sexy?Sex"<cout<<"_?Sexy?__?Sexy?Sexy?Sex"<cout<<"___?Sex____?Sexy?Sexy?"<cout<<"___?Sex_____?Sexy?Sexy"<cout<<"___?Sex_____?Sexy?Sexy"<cout<<"____?Sex____?Sexy?Sexy"<cout<<"_____?Se____?Sexy?Sex"<cout<<"______?Se__?Sexy?Sexy"<cout<<"_______?Sexy?Sexy?Sex"<cout<<"________?Sexy?Sexy?Sex"<cout<<"_______?SexySexy?Sexy?Se"<cout<<"_______?Sexy?Sexy?Sexy?Sexy?"<cout<<"_______?Sexy?Sexy?Sexy?Sexy?Sexy"<cout<<"_______?Sexy?Sexy?Sexy?Sexy?Sexy?R"<cout<<"________?Sexy?Sexy____?Sexy?Sexy?Se"<cout<<"_________?Sexy?Se_______?Sexy?Sexy?"<cout<<"_________?Sexy?Se_____?Sexy?Sexy?"<cout<<"_________?Sexy?R____?Sexy?Sexy"<cout<<"_________?Sexy?R_?Sexy?Sexy"<cout<<"________?Sexy?Sexy?Sexy"<cout<<"________?Sexy?Sexy?R"<cout<<"________?Sexy?Sexy"<cout<<"_______?Sexy?Se"<cout<<"_______?Sexy?"<cout<<"______?Sexy?"<cout<<"______?Sexy?"<cout<<"______?Sexy?"<cout<<"______?Sexy"<cout<<"______?Sexy"<cout<<"_______?Sex"<cout<<"_______?Sex"<cout<<"______?Sexy?"<cout<<"______?Sexyyyy"<
  do{
     cout<<"\t\t===========[ Pilihan Transaksi ]==========="<     cout<<"\t\t=======                             ======="<     cout<<"\t\t||||      1. Input Data Pembelian      ||||"<     cout<<"\t\t  ||||    2. Tampil Data Pembelian   |||| "<     cout<<"\t\t  ||||    3. Hitung Transaksi        |||| "<     cout<<"\t\t||||      4. Keluar dari Program       ||||"<     cout<<"\t\t=======                             ======="<     cout<<"\t\t==========================================="<     cout<<"\t\t\t\t==> Pilihan anda adalah : ";cin>>pilihan;
     cout<<"\t\t==========================================="<
   if (pilihan==1){
     BOX Y;
     inputData(Y);
     cout<<"======================================>>>"<     cout<}
   else if (pilihan==2){
     BOX Y;
     tampilData(Y);
     cout<<"======================================>>>"<     cout<}
   else if (pilihan==3){
     BOX Y;
     hitungTransaksi(Y);
     cout<}
   else{}

}  while(pilihan != 4);

cout<return 0;
}

posted under , |

0 comments:

Post a Comment

Newer Post Older Post Home



Recent Comments