Kasir Sederhana dengan Program C++

#include<iostream>

using namespace std;
int main ()

{
int kode,pri,jml,tot,byr,kbl;
char mad;
do
{
cout<<” Pondok Makan Pantang Kenyang “<<endl;
cout<<” PEMADAM KELAPARAN “<<endl;
cout<<” Gurih Manis Sedap Seleraa “<<endl;

cout<<“Jl. Buntu No.01 “<<endl;
cout<<“============================================”<<endl;
cout<<“”<<endl;

cout<<“Menu Makanan Harga”<<endl;
cout<<“1. AYAM GORENG Rp. 10.000″<<endl;
cout<<“2. NASI GORENG Rp. 8.000″<<endl;
cout<<“3. MIE PANGSIT Rp. 10.000″<<endl;
cout<<“4. AYAM LALAPAN + NASI Rp. 12.000″<<endl;
cout<<“5. NASI CAMPUR Rp. 8.000″<<endl;
cout<<“6. JUS JERUK Rp. 6.000″<<endl

cout<<“7. AIR GELAS Rp. 500″<<endl;
cout<<‘\n'<<“MASUKKAN PILIHAN ANDA :”;

cin>>kode;
switch (kode)

{

case 1:
cout<<‘\n'<<“AYAM GORENG”<>jml;
tot=prijml; cout<<“Total harganya yaitu : Rp. “<>byr; kbl=byr-tot; cout<<“KEMBALI : Rp. “<>mad; break; case 2: cout<<‘\n'<<“NASI GORENG”<>jml; tot=prijml;
cout<<“Total harganya yaitu : Rp. “<>byr;
kbl=byr-tot;
cout<<“KEMBALI : Rp. “<>mad;
break;
case 3:
cout<<‘\n'<<“MIE PANGSIT”<>jml;
tot=prijml; cout<<“Total harganya yaitu : Rp. “<>byr; kbl=byr-tot; cout<<“KEMBALI : Rp. “<>mad; break; case 4: cout<<‘\n'<<“AYAM LALAPAN + NASI”<>jml; tot=prijml;
cout<<“Total harganya yaitu : Rp. “<>byr;
kbl=byr-tot;
cout<<“KEMBALI : Rp. “<>mad;
break;
case 5:
cout<<‘\n'<<“NASI CAMPUR”<>jml;
tot=prijml; cout<<“Total harganya yaitu : Rp. “<>byr; kbl=byr-tot; cout<<“KEMBALI : Rp. “<>mad; break; case 6: cout<<‘\n'<<“JUS JERUK”<>jml; tot=prijml;
cout<<“Total harganya yaitu : Rp. “<>byr;
kbl=byr-tot;
cout<<“KEMBALI : Rp. “<>mad;
break;
case 7:
cout<<‘\n'<<“AIR GELAS”<>jml;
tot=pri*jml;
cout<<“Total harganya yaitu : Rp. “<>byr;
kbl=byr-tot;
cout<<“KEMBALI : Rp. “<>mad;
break;
default:
cout<<“Kode yang anda masukkan tidak ada”;
}
}
while (mad/=’Y’);
cout<<“Terimah Kasih Atas Kunjungan Anda di Pondok Makan Pantang Krnyang”;
return 0;
}

Leave a comment