Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main(){
- char ulang;
- do {
- int Harga_EP_WEEKDAY,Harga_EP_WEEKEND, Harga_EP_LIBUR, Harga_5D_WEEKDAY, Harga_5D_WEEKEND, Harga_5D_LIBUR, Harga_WP_WEEKDAY, Harga_WP_WEEKEND, Harga_WP_LIBUR, Harga_FA_WEEKDAY, Harga_FA_WEEKEND, Harga_FA_LIBUR, Pemesanan_EP_WEEKDAY, Pemesanan_EP_WEEKEND, Pemesanan_EP_LIBUR, Pemesanan_5D_WEEKDAY, Pemesanan_5D_WEEKEND, Pemesanan_5D_LIBUR, Pemesanan_WP_WEEKDAY, Pemesanan_WP_WEEKEND, Pemesanan_WP_LIBUR, Pemesanan_FA_WEEKDAY, Pemesanan_FA_WEEKEND, Pemesanan_FA_LIBUR, Jumlah_Pemesanan;
- float Jumlah_EP_WEEKDAY, Jumlah_EP_WEEKEND, Jumlah_EP_LIBUR, Jumlah_5D_WEEKDAY, Jumlah_5D_WEEKEND, Jumlah_5D_LIBUR, Jumlah_WP_WEEKDAY, Jumlah_WP_WEEKEND, Jumlah_WP_LIBUR, Jumlah_FA_WEEKDAY, Jumlah_FA_WEEKEND, Jumlah_FA_LIBUR, Jumlah, Disc, Harga_Disc, Tunai, Kembali;
- Harga_EP_WEEKDAY = 90000;
- Harga_EP_WEEKEND = 120000;
- Harga_EP_LIBUR = 150000;
- Harga_5D_WEEKDAY = 100000;
- Harga_5D_WEEKEND = 150000;
- Harga_5D_LIBUR = 170000;
- Harga_WP_WEEKDAY = 70000;
- Harga_WP_WEEKEND = 90000;
- Harga_WP_LIBUR = 100000;
- Harga_FA_WEEKDAY = 130000;
- Harga_FA_WEEKEND = 180000;
- Harga_FA_LIBUR = 200000;
- string nama;
- char member;
- cout << "+-----------------------------------------------------------------------------------------------------------------+\n";
- cout << "+-----------------------------------------------TIKET WAHANA------------------------------------------------------+\n";
- cout << "+-----------------------------------------------------------------------------------------------------------------+\n";
- cout << "+ - Data Harga Tiket Masuk Wahana - +\n";
- cout << "|Kode| |Nama Wahana| |HARI| |HARGA| \n";
- cout << "-------------------------------------------------------------------------------------------------------------------\n";
- cout << "|EP| |EDU PRAK | |WEEKDAY, WEEKEND, LIBUR | |(90000), (120000), (150000) | \n";
- cout << "|5D| |5D GENERATION | |WEEKDAY, WEEKEND, LIBUR | |(100000), (150000), (170000) | \n";
- cout << "|WP| |WATER PARK | |WEEKDAY, WEEKEND, LIBUR | |(70000), (90000), (100000) | \n";
- cout << "|FP| |FUN ADVENTURE | |WEEKDAY, WEEKEND, LIBUR | |(130000), (180000), (200000) | \n";
- cout << "-----------------------------------------------------\n";
- cout << "+ - Member & Rombongan 10 Orang Disc 25% - +\n";
- cout << "-----------------------------------------------------\n";
- cout << " \n";
- cout << "------------------INPUT DATA COSTUMER----------------\n";
- cout << "Masukkan Nama Costumer : ";
- cin.ignore();
- fflush(stdin);
- getline(cin,nama);
- cout << "Membership (Y/N) : ";
- cin >> member;
- cout << " \n";
- cout << "--------------------DATA PEMESANAN------------------\n";
- cout << "[EP] EDU PRAK WEEKDAY : ";
- cin >> Pemesanan_EP_WEEKDAY;
- Jumlah_EP_WEEKDAY = Pemesanan_EP_WEEKDAY * Harga_EP_WEEKDAY;
- if (Pemesanan_EP_WEEKDAY == 0){
- cout << " - ";
- }else{ cout << " Rp 90.000 X " << "(" << Pemesanan_EP_WEEKDAY << ") " << "Total : Rp." << Jumlah_EP_WEEKDAY ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[EP] EDU PRAK WEEKEND : ";
- cin >> Pemesanan_EP_WEEKEND;
- Jumlah_EP_WEEKEND = Pemesanan_EP_WEEKEND * Harga_EP_WEEKEND;
- if (Pemesanan_EP_WEEKEND == 0){
- cout << " - ";
- }else{ cout << " Rp 120.000 X " << "(" << Pemesanan_EP_WEEKEND << ") " << "Total : Rp." << Jumlah_EP_WEEKEND ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[EP] EDU PRAK LIBUR : ";
- cin >> Pemesanan_EP_LIBUR;
- Jumlah_EP_LIBUR = Pemesanan_EP_LIBUR * Harga_EP_LIBUR;
- if (Pemesanan_EP_WEEKEND == 0){
- cout << " - ";
- }else{ cout << " Rp 150.000 X " << "(" << Pemesanan_EP_LIBUR << ") " << "Total : Rp." << Jumlah_EP_LIBUR ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[5D] 5D GENERATION WEEKDAY : ";
- cin >> Pemesanan_5D_WEEKDAY;
- Jumlah_5D_WEEKDAY = Pemesanan_5D_WEEKDAY * Harga_5D_WEEKDAY;
- if (Pemesanan_5D_WEEKDAY == 0){
- cout << " - ";
- }else{ cout << " Rp 100.000 X " << "(" << Pemesanan_5D_WEEKDAY << ") " << "Total : Rp." << Jumlah_5D_WEEKDAY ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[5D] 5D GENERATION WEEKEND : ";
- cin >> Pemesanan_5D_WEEKEND;
- Jumlah_5D_WEEKEND = Pemesanan_5D_WEEKEND * Harga_5D_WEEKEND;
- if (Pemesanan_5D_WEEKEND == 0){
- cout << " - ";
- }else{ cout << " Rp 150.000 X " << "(" << Pemesanan_5D_WEEKEND << ") " << "Total : Rp." << Jumlah_5D_WEEKEND ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[5D] 5D GENERATION LIBUR : ";
- cin >> Pemesanan_5D_LIBUR;
- Jumlah_5D_LIBUR = Pemesanan_5D_LIBUR * Harga_5D_LIBUR;
- if (Pemesanan_5D_LIBUR == 0){
- cout << " - ";
- }else{ cout << " Rp 170.000 X " << "(" << Pemesanan_5D_LIBUR << ") " << "Total : Rp." << Jumlah_5D_LIBUR ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[WP] WATER PARK WEEKDAY : ";
- cin >> Pemesanan_WP_WEEKDAY;
- Jumlah_WP_WEEKDAY = Pemesanan_WP_WEEKDAY * Harga_WP_WEEKDAY;
- if (Pemesanan_WP_WEEKDAY == 0){
- cout << " - ";
- }else{ cout << " Rp 70.000 X " << "(" << Pemesanan_WP_WEEKDAY << ") " << "Total : Rp." << Jumlah_WP_WEEKDAY ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[WP] WATER PARK WEEKEND : ";
- cin >> Pemesanan_WP_WEEKEND;
- Jumlah_WP_WEEKEND = Pemesanan_WP_WEEKEND * Harga_WP_WEEKEND;
- if (Pemesanan_WP_WEEKEND == 0){
- cout << " - ";
- }else{ cout << " Rp 90.000 X " << "(" << Pemesanan_WP_WEEKEND << ") " << "Total : Rp." << Jumlah_WP_WEEKEND ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[WP] WATER PARK LIBUR : ";
- cin >> Pemesanan_WP_LIBUR;
- Jumlah_WP_LIBUR = Pemesanan_WP_LIBUR * Harga_WP_LIBUR;
- if (Pemesanan_WP_LIBUR == 0){
- cout << " - ";
- }else{ cout << " Rp 100.000 X " << "(" << Pemesanan_WP_LIBUR << ") " << "Total : Rp." << Jumlah_WP_LIBUR ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[FA] FUN ADVENTURE WEEKDAY : ";
- cin >> Pemesanan_FA_WEEKDAY;
- Jumlah_FA_WEEKDAY = Pemesanan_FA_WEEKDAY * Harga_FA_WEEKDAY;
- if (Pemesanan_FA_WEEKDAY == 0){
- cout << " - ";
- }else{ cout << " Rp 130.000 X " << "(" << Pemesanan_FA_WEEKDAY << ") " << "Total : Rp." << Jumlah_FA_WEEKDAY ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[FA] FUN ADVENTURE WEEKEND : ";
- cin >> Pemesanan_FA_WEEKEND;
- Jumlah_FA_WEEKEND = Pemesanan_FA_WEEKEND * Harga_FA_WEEKEND;
- if (Pemesanan_FA_WEEKEND == 0){
- cout << " - ";
- }else{ cout << " Rp 180.000 X " << "(" << Pemesanan_FA_WEEKEND << ") " << "Total : Rp." << Jumlah_FA_WEEKEND ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << "[FA] FUN ADVENTURE LIBUR : ";
- cin >> Pemesanan_FA_LIBUR;
- Jumlah_FA_LIBUR = Pemesanan_FA_LIBUR * Harga_FA_LIBUR;
- if (Pemesanan_FA_LIBUR == 0){
- cout << " - ";
- }else{ cout << " Rp 200.000 X " << "(" << Pemesanan_FA_LIBUR << ") " << "Total : Rp." << Jumlah_FA_LIBUR ;
- }
- cout << "\n";
- cout << "------------------------------------------------- +\n";
- cout << " \n";
- cout << "-----------------------TOTAL-------------------------\n";
- Jumlah = Jumlah_EP_WEEKDAY + Jumlah_EP_WEEKDAY + Jumlah_EP_LIBUR + Jumlah_5D_WEEKDAY + Jumlah_5D_WEEKEND + Jumlah_5D_LIBUR + Jumlah_WP_WEEKDAY + Jumlah_WP_WEEKEND + Jumlah_WP_LIBUR + Jumlah_FA_WEEKDAY + Jumlah_FA_WEEKEND + Jumlah_FA_LIBUR ;
- cout << "Total " << Jumlah;
- cout << "\n";
- cout << "Uang Tunai : " ;
- cin >> Tunai ;
- cout << "\n";
- Jumlah_Pemesanan = Pemesanan_EP_WEEKDAY + Pemesanan_EP_WEEKEND + Pemesanan_EP_LIBUR + Pemesanan_5D_WEEKDAY + Pemesanan_5D_WEEKEND + Pemesanan_5D_LIBUR + Pemesanan_WP_WEEKDAY + Pemesanan_WP_WEEKEND + Pemesanan_WP_LIBUR + Pemesanan_FA_WEEKDAY + Pemesanan_FA_WEEKEND + Pemesanan_FA_LIBUR ;
- if (member == 'Y' || Jumlah_Pemesanan >= 10){
- Disc = Jumlah * 25 / 100;
- Harga_Disc = Jumlah - Disc;
- cout << "Discount (25%) " << Harga_Disc;
- cout << "\n";
- cout << "Kembali : " ;
- Kembali = Tunai - Harga_Disc;
- cout << " Rp. " << Kembali ;
- cout << "\n";
- } else {
- cout << "Kembali : " ;
- Kembali = Tunai - Jumlah;
- cout << " Rp. " << Kembali ;
- cout << "\n";
- }
- cout << "------------TERIMAKASIH SUDAH BERKUNJUNG------------\n";
- cout << "\n";
- cout << "Input Ulang (y/n)" ;
- cin >> ulang;
- cout << "\033[2J\033[1;1H";
- } while(ulang=='Y');
- cout<<"Tidak mengulang dan terima kasih\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement