#include<iostream.h>
#include<stdio.h>
#include"conio.h"
main()
{
char kode,nmpembeli[25],judul[25];
long diskon,total,jumbay;
int jumbel,harga;
cout<<"Cinema 21"<<endl;
cout<<"===================="<<endl;
cout<<"Masukkan Nama Pembeli     :";cin>>nmpembeli;
cout<<"Masukkan Kode Studio[A/B] :";cin>>kode;
cout<<"Masukkan JUmlah Beli     :";cin>>jumbel;
switch (kode)
{
case 'A':
case 'a':
{
strcpy(judul,"Harry Potter");
harga=20000;
break;
}
case 'B':
case 'b':
{
strcpy(judul,"Final Destinations");
harga=30000;
break;
}
default:
{
cout<<"Kode tidak ada";
}
}
total=harga*jumbel;
if (jumbel>=4)
{
diskon=0.1*total;
}
else
if (jumbel>=2)
{
diskon=0.05*total;
}
else
{
diskon=0;
}
jumbay=total-diskon;
cout<<endl;
cout<<"Cinema 21"<<endl;
cout<<"==================="<<endl;
cout<<"Nama Pembeli ="<<nmpembeli<<endl;
cout<<"kode teathre  ="<<kode<<endl;
cout<<"Judul Film  ="<<judul<<endl;
cout<<"Harga        ="<<harga<<endl;
cout<<"Jumlah Beli  ="<<jumbel<<endl;
cout<<"Totalharga  ="<<total<<endl;
cout<<"Diskon  ="<<diskon<<endl;
cout<<"Jumlah bayar  ="<<jumbay<<endl;
getch();
}
Rabu, 19 Oktober 2011
Tugas Pertemuan 7-8
Diposting oleh
1st Specta's Blog
05.06
Popular Posts
- 
 MENGHITUNG SELISIH TANGGAL DI DELPHI 7 MENGHITUNG SELISIH TANGGAL DI DELPHI 7
- 
Tugas Pertemuan 7-8 
- 
Contoh Array + Fungsi 
- 
Nested if 
- 
Membuat Menu Utama dan File .Exe pada Visual Foxpro 9.0 
- 
 Lesson 5th : "Session About How to Make Inner Join In 3 tables" Lesson 5th : "Session About How to Make Inner Join In 3 tables"
- 
Latihan C++ 
- 
Materi Delphi selasa 4 Januari 2010 
- 
Aplikasi Peminjaman Menggunakan Visual Foxpro 9.0 
- 
Menghitung Nlai akhir Mahasiswa menggunakan scanf dan printf 
Watch IT....
HIT COUNTER
Total Tayangan Halaman
Pengikut
Visitor
Arsip Blog
Labels
- delphi (2)
- materi (3)
- SQL (1)
- Visual Basic (1)

