Ketentuan Soal
Jawaban
#include <stdio>
#include <conio>
#include <iostream>
main()
{
char np[20],kd,*jk;
int jumkue,hrg,total;
clrscr();
cout<<"\n Toko Kue Nikmat";
cout<<"\n ******************************************************";
cout<<"\n Daftar Menu Toko Kue Nikmat";
cout<<"\n________________________________________________________";
cout<<"\n 1.Bolu Black Forest";
cout<<"\n 2.Cheese Cake";
cout<<"\n 3.Banana Cake";
cout<<"\n 4.Strawberry Cake";
cout<<"\n________________________________________________________";
cout<<"\n Nama Pembeli \t: ";cin>>np;
cout<<"\n________________________________________________________";
cout<<"\n Masukkan Kode Kue \t : ";cin>>kd;
cout<<"\n Masukkan Jumlah Kue \t : ";cin>>jumkue;
if (kd=='1')
{
jk="Bolu Black Forest";
hrg=60000;
}
else
if(kd=='2')
{
jk="Cheese cake";
hrg=45000;
}
else
if(kd=='3')
{
jk="Banana Cake";
hrg=25500;
}
else
{
jk="Strawberry Cake";
hrg=35000;
}
cout<<"\n Toko Kue Nikmat";
cout<<"\n Struk Pembayaran";
cout<<"\n---------------------------------------";
cout<<"\n Nama Pembeli \t : "<<np;
cout<<"\n Kode Kue \t : "<<kd;
cout<<"\n Nama Kue \t : "<<jk;
cout<<"\n Harga Kue \t : "<<hrg;
cout<<"\n Jumlah Kue \t : "<<jumkue;
cout<<"\n_______________________________________";
total=hrg*jumkue;
cout<<"\n Jumlah Bayar \t: "<<total;
getch();
}