Nim : 12084411
Kelas : 12.6G.03
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
main()
{
char namap[30],kodek,*namak;
int harga,jml,jmlbyr;
cout<<"DAFTAR MENU TOKO KUE NIKMAT"<<endl;
cout<<""<<endl;
cout<<" 1.Bolu Black Forest\t"<<endl;
cout<<" 2.Chesee Cake\t"<<endl;
cout<<" 3.Banana Cake\t"<<endl;
cout<<" 4.Strawberry Cake\t"<<endl;
cout<<""<<endl;
cout<<"Nama Pembeli =\t";cin>>namap;
cout<<"--------------------------------------"<<endl;
cout<<"Kode Kue =\t";cin>>kodek;
cout<<"Jumlah Kue =\t";cin>>jml;
clrscr;
cout<<"TOKO KUE NIKMAT"<<endl;
cout<<"Struk Pembayaran"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"Nama Pembeli = "<<namap<<endl;
cout<<"Kode Kue = "<<kodek<<endl;
switch (kodek)
{case '1' :
namak="Bolu Black Forest";
harga=60000;
break;
case '2' :
namak="Chesee Cake";
harga=45000;
break;
case '3' :
namak="Banana Cake";
harga=25500;
break;
case '4' :
namak="Strawberry Cake";
harga=35000;
break;
default :
cout<<"Anda salah memasukan kode"<<endl;
break;
}
cout<<"Nama Kue = "<<namak<<endl;
cout<<"Harga Kue = Rp"<<harga<<endl;
cout<<"Jumlah Kue = "<<jml<<endl;
cout<<"====================================="<<endl;
jmlbyr=harga*jml;
cout<<"Jumlah Bayar = Rp"<<jmlbyr<<endl;
cout<<""<<endl;
cout<<"Terimakasih Atas Kunjungan Anda"<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar