# include<conio.h>
# include<stdio.h>
# include<iostream.h>
main()
{
char nm[20],kd,*nmk;
int jml,ttl,hrg;
cout<<endl;
cout<<endl;
cout<<" DAFTAR MENU TOKO KUE \"NIKMAT\""<<endl;
cout<<"--------------------------------------"<<endl;
cout<<" 1. Bolu Black Forest"<<endl;
cout<<" 2. Cheese Cake"<<endl;
cout<<" 3. Banana Cake"<<endl;
cout<<" 4. Strawbery Cake"<<endl;
cout<<endl;
cout<<endl;
cout<<" Nama Pembeli = ";cin>>nm;
cout<<"---------------------------"<<endl;
cout<<" Kode Kue = ";cin>>kd;
cout<<" Jumlah Kue = ";cin>>jml;
if(kd=='1')
{
nmk="Bolu Black Forest";
hrg=60000;
}
else if(kd=='2')
{
nmk="Cheese Cake";
hrg=45000;
}
else if(kd=='3')
{
nmk="Banana Cake";
hrg=25500;
}
else
{
nmk="Strawbery Cake";
hrg=35000;
}
ttl=jml*hrg;
clrscr();
cout<<endl;
cout<<endl;
cout<<" TOKO KUE \"NIKMAT\""<<endl;
cout<<" Struk Pembayaran"<<endl;
cout<<"---------------------------------"<<endl;
cout<<" Nama Pembeli : "<<nm<<endl;
cout<<" Kode Kue : "<<kd<<endl;
cout<<" Nama Kue : "<<nmk<<endl;
cout<<" Harga : Rp. "<<hrg<<endl;
cout<<" Jumlah Kue : "<<jml<<endl;
cout<<"----------------------------------"<<endl;
cout<<" Total Bayar : "<<ttl<<endl;
getch();
}
tampilan running