#include
#include
#include
main()
{
char kode,movie[30],jam,np[20],jam2[10],room[10],kursi[50]; // 12 VARIABEL, 2 tipe data (string dan integer)
int harga,jumbel,totbay,kembali,dibayar;
cout<<"===================================="<
cout<<"Input No Kursi [1-50] : ";cin>>kursi;
cout<<"Pilih judul Film [A/B/C] : ";cin>>kode;
cout<<"Pilih Waktu nonton [1/2/3] : ";cin>>jam;
if (kode=='A'||kode=='a') //seleksi kondisi (materi ada di slide 4/modul hal 66)
{
strcpy(movie,"RUDY HABIBIE (habibie ainun 2)"); //kode A,
if (jam=='1')
{
strcpy(jam2,"Pukul 10.00 s/d 12.00"); //cetak perintah pernyataan
strcpy(room,"Bioskop 1");
harga=45000;
}
else if (jam=='2')
{
strcpy(jam2,"Pukul 14.00 s/d 16.00"); //perintah cetak waktu nonton
strcpy(room,"Bioskop 1"); //perintah cetak room Bioskop
harga=45000;
}
else if (jam=='3')
{
strcpy(jam2,"Pukul 18.30 s/d 20.30");
strcpy(room,"Bioskop 1");
harga=45000;
}
}
if (kode=='B'||kode=='b') //kode B
{
strcpy(movie,"WARKOP DKI REBURN part 1 (jakrik bos)");
if (jam=='1')
{
strcpy(jam2,"Pukul 10.00 s/d 12.00");
strcpy(room,"Bioskop 2");
harga=45000;
}
else if (jam=='2')
{
strcpy(jam2,"Pukul 14.00 s/d 16.00");
strcpy(room,"Bioskop 2");
harga=45000;
}
else if (jam=='3')
{
strcpy(jam2,"Pukul 18.30 s/d 20.30");
strcpy(room,"Bioskop 2");
harga=45000;
}
}
if (kode=='C'||kode=='c') //kode C
{
strcpy(movie,"ADA APA DENGAN CINTA 2");
if (jam=='1')
{
strcpy(jam2,"Pukul 10.00 s/d 12.00");
strcpy(room,"Bioskop 3");
harga=45000;
}
else if (jam=='2')
{
strcpy(jam2,"Pukul 14.00 s/d 16.00");
strcpy(room,"Bioskop 3");
harga=45000;
}
else if (jam=='3')
{
strcpy(jam2,"Pukul 18.30 s/d 20.30");
strcpy(room,"Bioskop 3");
harga=45000;
} // sampai sini
}
clrscr();
cout<<"===================================="<
cout<<"\n====================================";
cout<<"\nTanggal : Senin,31/oktober"; //outputan 1
cout<<"\nAtas Nama : "<
cout<<"\nInput Jumlah tiket :";cin>>jumbel; //inputan 2
cout<<"\n====================================";
totbay=harga*jumbel;
cout<<"\nTotal yang harus dibayarkan :Rp "<
cout<<"\nUang yang dibayar :Rp ";cin>>dibayar; //INPUT 3
kembali=dibayar-totbay;
cout<<"\nkembalian :Rp "<
cout<<"\n SELAMAT MENYAKSIKAN "; //selesai
getch();
}
Tidak ada komentar:
Posting Komentar