# include "conio.h"
#include "iostream.h"
main()
{
char nm[20],kd,*jns;
int jmlh,byr,hrg;
cout<<"******TOKO KUE NIKMAT******"<<endl;
cout<<"**************************************"<<endl;
cout<<"****DARTAR MENU KUE NIKMAT****"<<endl;
cout<<"1.Bolu Black Forest Rp.60.000"<<endl;
cout<<"2.Cheese Cake Rp.45.000"<<endl;
cout<<"3.Banana Cake Rp.25.500"<<endl;
cout<<"4.Strawbery Cake Rp.35.000"<<endl;
cout<<"**************************************"<<endl;
cout<<"Nama Pembeli :";cin>>nm;
cout<<"Kode Kue [1|2|3|4]:";cin>>kd;
if (kd=='1')
{jns="Bolu Black Forest";
hrg=60000;
}
else
if (kd=='2')
{jns="Cheese Cake";
hrg=45000;
}
else
if (kd=='3')
{jns="Banana Cake";
hrg=25500;
}
else
{jns="Strawbery Cake";
hrg=35000;
}
cout<<"Jumlah Kue :";cin>>jmlh;
byr=jmlh*hrg;
clrscr();
cout<<"*****TOKO KUE NIKMAT******"<<endl;
cout<<"*************************************"<<endl;
cout<<"Struk Pembayaran"<<endl;
cout<<"Nama Pembeli :"<<nm<<endl;
cout<<"Kode Kue :"<<kd<<endl;
cout<<"Nama Kue :"<<jns<<endl;
cout<<"Harga Kue :Rp."<<hrg<<endl;
cout<<"Jumlah Kue :"<<jmlh<<endl;
cout<<"Jumlah Bayar :Rp."<<byr<<endl;
cout<<"*************************************"<<endl;
cout<<"***Terima Kasih Atas Kunjungannya***"<<endl;
getch();
}
OUTPUTNY :
Wacan opo ki.
BalasHapus