#include <iostream.h>
#include <stdio.h>
#include <conio.h>
main()
{
char pembeli[25],kd,*nkue;
int jumlah,harga,jumbay;
cout<<"DAFTAR MENU TOKO KUE NIKMAT"<<endl;
cout<<"\t 1. Bolu Black Forest"<<endl;
cout<<"\t 2. Cheese Cake"<<endl;
cout<<"\t 3. Banana Cake"<<endl;
cout<<"\t 4. Strawberry Cake"<<endl;
cout<<""<<endl;
cout<<"Nama Pembeli =";cin>>pembeli;
cout<<"----------------------------------------------"<<endl;
cout<<"Kode Kue =";cin>>kd;
cout<<"Jumlah Kue =";cin>>jumlah;
clrscr();
cout<<"TOKO KUE 'NIKMAT'"<<endl;
cout<<"Struk Pembayaran"<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"Nama Pembeli ="<<pembeli<<endl;
cout<<"Kode Kue ="<<kd<<endl;
if (kd=='1')
{
nkue="Bolu Black Forest";
harga=60000;
}
else if (kd=='2')
{
nkue="Cheese Cake";
harga=45000;
}
else if (kd=='3')
{
nkue="Banana Cake";
harga=25500;
}
else
{
nkue="Bolu Black Forest";
harga=60000;
}
cout<<"Nama Kue ="<<nkue<<endl;
cout<<"Harga Kue ="<<harga<<endl;
cout<<"Jumlah Kue ="<<jumlah<<endl;
jumbay=harga*jumlah;
cout<<"-------------------------------------"<<endl;
cout<<"Jumlah Bayar ="<<jumbay<<endl;
cout<<""<<endl;
cout<<"Terima Kasih Atas Kunjungannya";
getch();
}
oke...tugasnya.. sudah di cek
BalasHapusterima kasih