Nama : Nur wahyudi
Nim : 12084327
Kelas :12.6.G Lab C sore
Jawaban Soal Type A
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
main()
{
char kode,*namak,*namap;
int jumlah,harga,jumbay;
cout<<"DAFTAR MENU TOKO KUE NIKMAT"<<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<<"Nama Pembeli :";cin>>namap;
cout<<"============================"<<endl;
cout<<"Kode Kue :";cin>>kode;
cout<<"Jumlah Kue :";cin>>jumlah;
cout<<endl;
cout<<endl;
cout<<"TOKO KUE NIKMAT"<<endl;
cout<<"Struk Pembayaran"<<endl;
cout<<"============================"<<endl;
cout<<"Nama Pembeli :"<<namap<<endl;
cout<<"Kode Kue :"<<kode<<endl;
if(kode=='1'){
namak="Bolu Black Forest";
harga=60000;
}
else if (kode=='2'){
namak="Cheese Cake";
harga=45000;
}
else if (kode=='3'){
namak="Banana Cake";
harga=25500;
}
else if (kode=='4'){
namak="Strawbery Cake";
harga=35000;
}
cout<<"Nama Kue :"<<namak<<endl;
cout<<"Harga Kue :Rp."<<harga<<endl;
cout<<"Jumlah Kue :"<<jumlah<<endl;
cout<<"============================="<<endl;
jumbay=jumlah*harga;
cout<<"Jumlah Bayar :"<<jumbay<<endl;
cout<<endl;
cout<<"Terima Kasih Atas Kunjungannya";
getch();
}
Hasil Program
Tidak ada komentar:
Posting Komentar