0% found this document useful (0 votes)
96 views5 pages

Menu Kasir Prekju YK TMG

The document contains the code for a C++ program that acts as a simple food ordering system. It lists various food and drink items with prices, allows the user to enter the quantity for a selected item, calculates the total and change due. The program also has options for the user to make another order or end the transaction. It was written by Erlinda Nur Kholifah, a student with ID number 12 in class X TKJ 2.

Uploaded by

Leora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views5 pages

Menu Kasir Prekju YK TMG

The document contains the code for a C++ program that acts as a simple food ordering system. It lists various food and drink items with prices, allows the user to enter the quantity for a selected item, calculates the total and change due. The program also has options for the user to make another order or end the transaction. It was written by Erlinda Nur Kholifah, a student with ID number 12 in class X TKJ 2.

Uploaded by

Leora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Nama : Erlinda Nur Kholifah

No : 12

Kelas : X TKJ 2

#include <iostream>

using namespace std;

int main ()

char lagi;

int nama;

int pilihan;

int jumlah;

int dibayar;

int harga;

int total;

int kode;

awal:

system("cls");

cout<<"====================================="<<endl;

cout<<"===== Prekju YK TMG===="<<endl;

cout<<"=====Menu==================Harga===="<<endl;

cout<<"1. Ayam Geprek Polos Rp.12000"<<endl;

cout<<"2. Ayam Geprek Cheddar Rp.14000"<<endl;

cout<<"3. Ayam Geprek Moza Rp.16000"<<endl;

cout<<"4. Ayam Geprek Combi Rp.18000"<<endl;

cout<<"5. Black Choco Rp.6000"<<endl;

cout<<"6. Lemon Tea Rp. 4000"<<endl;

cout<<endl;
cout<<"Masukkan Pilihan Anda(1-8) =";

cin>>kode;

switch(kode)

case 1 :

cout<<"Ayam Geprek Polos"<<endl;

harga=12000;

cout<<"Masukkan Jumlah pesanan =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;

cout<<"Kembalian ="<<dibayar-total<<endl;

break;

case 2 :

cout<<"Ayam Geprek Cheddar"<<endl;

harga=14000;

cout<<"Masukkan Jumlah =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;
cout<<"Kembalian ="<<dibayar-total<<endl;

break;

case 3 :

cout<<"Ayam Geprek Moza"<<endl ;

harga=16000;

cout<<"Masukkan Jumlah =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;

cout<<"Kembalian ="<<dibayar-total<<endl;

break;

case 4 :

cout<<"Ayam Geprek Combi"<<endl;

harga=18000;

cout<<"Masukkan Jumlah =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga yaitu ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;

cout<<"Kembalian ="<<dibayar-total<<endl;

break;
case 5 :

cout<<"Balck Choco"<<endl;

harga=6000;

cout<<"Masukkan Jumlah =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga yaitu ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;

cout<<"Kembalian ="<<dibayar-total<<endl;

break;

case 6 :

cout<<"Lemon Tea"<<endl;

harga=4000;

cout<<"Masukkan Jumlah =";

cin>>jumlah;

cout<<endl;

total = jumlah*harga;

cout<<"Total harga yaitu ="<<total<<endl;

cout<<"DIBAYAR =";

cin>>dibayar;

cout<<endl;

cout<<"Kembalian ="<<dibayar-total<<endl;

break;

default:

cout<<"Kode tersebut tidak ada dalam menu"<<endl;

}
cout<<"Ada yang ingin dipesan lagi (Y?N)";

cin>>lagi;

if(lagi=='y' || lagi=='Y'){

goto awal;

if (lagi=='N' || lagi=='n'){

goto selesai;

selesai:

system("cls");

cout<<"Terima kasih atas kunjungan nda di Prekju YK TMG"<<endl;

return 0;

You might also like