Advertisement
JUN7

WAHANA ARJUN GANTENG

Nov 10th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 10.57 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.  
  9. char ulang;
  10.  
  11.     do {
  12.    
  13.  
  14.     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;
  15.  
  16.     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;
  17.  
  18.     Harga_EP_WEEKDAY = 90000;
  19.     Harga_EP_WEEKEND = 120000;
  20.     Harga_EP_LIBUR = 150000;
  21.     Harga_5D_WEEKDAY = 100000;
  22.     Harga_5D_WEEKEND = 150000;
  23.     Harga_5D_LIBUR = 170000;
  24.     Harga_WP_WEEKDAY = 70000;
  25.     Harga_WP_WEEKEND = 90000;
  26.     Harga_WP_LIBUR = 100000;
  27.     Harga_FA_WEEKDAY = 130000;
  28.     Harga_FA_WEEKEND = 180000;
  29.     Harga_FA_LIBUR = 200000;
  30.    
  31.  
  32.     string nama;
  33.  
  34.     char member;
  35.  
  36.  
  37.     cout << "+-----------------------------------------------------------------------------------------------------------------+\n";
  38.     cout << "+-----------------------------------------------TIKET WAHANA------------------------------------------------------+\n";
  39.     cout << "+-----------------------------------------------------------------------------------------------------------------+\n";
  40.     cout << "+                                   - Data Harga Tiket Masuk Wahana -                                             +\n";
  41.     cout << "|Kode|    |Nama Wahana|                      |HARI|                           |HARGA|                              \n";
  42.     cout << "-------------------------------------------------------------------------------------------------------------------\n";
  43.     cout << "|EP|     |EDU PRAK         |          |WEEKDAY, WEEKEND, LIBUR    |           |(90000), (120000), (150000)  |      \n";
  44.     cout << "|5D|     |5D GENERATION    |          |WEEKDAY, WEEKEND, LIBUR    |           |(100000), (150000), (170000) |      \n";
  45.     cout << "|WP|     |WATER PARK       |          |WEEKDAY, WEEKEND, LIBUR    |           |(70000), (90000), (100000)   |      \n";
  46.     cout << "|FP|     |FUN ADVENTURE    |          |WEEKDAY, WEEKEND, LIBUR    |           |(130000), (180000), (200000) |      \n";
  47.     cout << "-----------------------------------------------------\n";
  48.     cout << "+       - Member & Rombongan 10 Orang Disc 25% -     +\n";
  49.     cout << "-----------------------------------------------------\n";
  50.     cout << "                                                     \n";
  51.     cout << "------------------INPUT DATA COSTUMER----------------\n";
  52.     cout << "Masukkan Nama Costumer : ";
  53.  
  54.     cin.ignore();
  55.     fflush(stdin);
  56.     getline(cin,nama);
  57.     cout << "Membership (Y/N) : ";
  58.     cin >> member;
  59.     cout << "                                                     \n";
  60.     cout << "--------------------DATA PEMESANAN------------------\n";
  61.  
  62.  
  63.     cout << "[EP] EDU PRAK WEEKDAY : ";
  64.     cin >> Pemesanan_EP_WEEKDAY;
  65.     Jumlah_EP_WEEKDAY = Pemesanan_EP_WEEKDAY * Harga_EP_WEEKDAY;
  66.  
  67.     if (Pemesanan_EP_WEEKDAY == 0){
  68.         cout << "                                           - ";
  69.     }else{ cout << "                   Rp 90.000 X " << "(" << Pemesanan_EP_WEEKDAY << ") " << "Total : Rp." << Jumlah_EP_WEEKDAY ;
  70.     }
  71.    
  72.     cout << "\n";
  73.     cout << "-------------------------------------------------   +\n";
  74.  
  75.  
  76.     cout << "[EP] EDU PRAK WEEKEND : ";
  77.     cin >> Pemesanan_EP_WEEKEND;
  78.     Jumlah_EP_WEEKEND = Pemesanan_EP_WEEKEND * Harga_EP_WEEKEND;
  79.  
  80.     if (Pemesanan_EP_WEEKEND == 0){
  81.         cout << "                                           - ";
  82.     }else{ cout << "                   Rp 120.000 X " << "(" << Pemesanan_EP_WEEKEND << ") " << "Total : Rp." << Jumlah_EP_WEEKEND ;
  83.     }
  84.    
  85.     cout << "\n";
  86.     cout << "-------------------------------------------------   +\n";
  87.    
  88.    
  89.     cout << "[EP] EDU PRAK LIBUR : ";
  90.     cin >> Pemesanan_EP_LIBUR;
  91.     Jumlah_EP_LIBUR = Pemesanan_EP_LIBUR * Harga_EP_LIBUR;
  92.  
  93.     if (Pemesanan_EP_WEEKEND == 0){
  94.         cout << "                                           - ";
  95.     }else{ cout << "                   Rp 150.000 X " << "(" << Pemesanan_EP_LIBUR << ") " << "Total : Rp." << Jumlah_EP_LIBUR ;
  96.     }
  97.    
  98.     cout << "\n";
  99.     cout << "-------------------------------------------------   +\n";  
  100.  
  101.  
  102.     cout << "[5D] 5D GENERATION WEEKDAY : ";
  103.     cin >> Pemesanan_5D_WEEKDAY;
  104.     Jumlah_5D_WEEKDAY = Pemesanan_5D_WEEKDAY * Harga_5D_WEEKDAY;
  105.  
  106.     if (Pemesanan_5D_WEEKDAY == 0){
  107.         cout << "                                           - ";
  108.     }else{ cout << "                   Rp 100.000 X " << "(" << Pemesanan_5D_WEEKDAY << ") " << "Total : Rp." << Jumlah_5D_WEEKDAY ;
  109.     }
  110.    
  111.     cout << "\n";
  112.     cout << "-------------------------------------------------   +\n";
  113.    
  114.     cout << "[5D] 5D GENERATION WEEKEND : ";
  115.     cin >> Pemesanan_5D_WEEKEND;
  116.     Jumlah_5D_WEEKEND = Pemesanan_5D_WEEKEND * Harga_5D_WEEKEND;
  117.  
  118.     if (Pemesanan_5D_WEEKEND == 0){
  119.         cout << "                                           - ";
  120.     }else{ cout << "                   Rp 150.000 X " << "(" << Pemesanan_5D_WEEKEND << ") " << "Total : Rp." << Jumlah_5D_WEEKEND ;
  121.     }
  122.    
  123.     cout << "\n";
  124.     cout << "-------------------------------------------------   +\n";
  125.    
  126.    
  127.     cout << "[5D] 5D GENERATION LIBUR : ";
  128.     cin >> Pemesanan_5D_LIBUR;
  129.     Jumlah_5D_LIBUR = Pemesanan_5D_LIBUR * Harga_5D_LIBUR;
  130.  
  131.     if (Pemesanan_5D_LIBUR == 0){
  132.         cout << "                                           - ";
  133.     }else{ cout << "                   Rp 170.000 X " << "(" << Pemesanan_5D_LIBUR << ") " << "Total : Rp." << Jumlah_5D_LIBUR ;
  134.     }
  135.    
  136.     cout << "\n";
  137.     cout << "-------------------------------------------------   +\n";
  138.  
  139.  
  140.     cout << "[WP] WATER PARK WEEKDAY : ";
  141.     cin >> Pemesanan_WP_WEEKDAY;
  142.     Jumlah_WP_WEEKDAY = Pemesanan_WP_WEEKDAY * Harga_WP_WEEKDAY;
  143.  
  144.     if (Pemesanan_WP_WEEKDAY == 0){
  145.         cout << "                                           - ";
  146.     }else{ cout << "                   Rp 70.000 X " << "(" << Pemesanan_WP_WEEKDAY << ") " << "Total : Rp." << Jumlah_WP_WEEKDAY ;
  147.     }
  148.    
  149.     cout << "\n";
  150.     cout << "-------------------------------------------------   +\n";
  151.    
  152.    
  153.     cout << "[WP] WATER PARK WEEKEND : ";
  154.     cin >> Pemesanan_WP_WEEKEND;
  155.     Jumlah_WP_WEEKEND = Pemesanan_WP_WEEKEND * Harga_WP_WEEKEND;
  156.  
  157.     if (Pemesanan_WP_WEEKEND == 0){
  158.         cout << "                                           - ";
  159.     }else{ cout << "                   Rp 90.000 X " << "(" << Pemesanan_WP_WEEKEND << ") " << "Total : Rp." << Jumlah_WP_WEEKEND ;
  160.     }
  161.    
  162.     cout << "\n";
  163.     cout << "-------------------------------------------------   +\n";
  164.    
  165.    
  166.     cout << "[WP] WATER PARK LIBUR : ";
  167.     cin >> Pemesanan_WP_LIBUR;
  168.     Jumlah_WP_LIBUR = Pemesanan_WP_LIBUR * Harga_WP_LIBUR;
  169.  
  170.     if (Pemesanan_WP_LIBUR == 0){
  171.         cout << "                                           - ";
  172.     }else{ cout << "                   Rp 100.000 X " << "(" << Pemesanan_WP_LIBUR << ") " << "Total : Rp." << Jumlah_WP_LIBUR ;
  173.     }
  174.    
  175.     cout << "\n";
  176.     cout << "-------------------------------------------------   +\n";
  177.    
  178.    
  179.     cout << "[FA] FUN ADVENTURE WEEKDAY : ";
  180.     cin >> Pemesanan_FA_WEEKDAY;
  181.     Jumlah_FA_WEEKDAY = Pemesanan_FA_WEEKDAY * Harga_FA_WEEKDAY;
  182.  
  183.     if (Pemesanan_FA_WEEKDAY == 0){
  184.         cout << "                                           - ";
  185.     }else{ cout << "                   Rp 130.000 X " << "(" << Pemesanan_FA_WEEKDAY << ") " << "Total : Rp." << Jumlah_FA_WEEKDAY ;
  186.     }
  187.    
  188.     cout << "\n";
  189.     cout << "-------------------------------------------------   +\n";
  190.    
  191.    
  192.     cout << "[FA] FUN ADVENTURE WEEKEND : ";
  193.     cin >> Pemesanan_FA_WEEKEND;
  194.     Jumlah_FA_WEEKEND = Pemesanan_FA_WEEKEND * Harga_FA_WEEKEND;
  195.  
  196.     if (Pemesanan_FA_WEEKEND == 0){
  197.         cout << "                                           - ";
  198.     }else{ cout << "                   Rp 180.000 X " << "(" << Pemesanan_FA_WEEKEND << ") " << "Total : Rp." << Jumlah_FA_WEEKEND ;
  199.     }
  200.    
  201.     cout << "\n";
  202.     cout << "-------------------------------------------------   +\n";
  203.    
  204.        
  205.     cout << "[FA] FUN ADVENTURE LIBUR : ";
  206.     cin >> Pemesanan_FA_LIBUR;
  207.     Jumlah_FA_LIBUR = Pemesanan_FA_LIBUR * Harga_FA_LIBUR;
  208.  
  209.     if (Pemesanan_FA_LIBUR == 0){
  210.         cout << "                                           - ";
  211.     }else{ cout << "                   Rp 200.000 X " << "(" << Pemesanan_FA_LIBUR << ") " << "Total : Rp." << Jumlah_FA_LIBUR ;
  212.     }
  213.    
  214.     cout << "\n";
  215.     cout << "-------------------------------------------------   +\n";
  216.  
  217.     cout << "                                                     \n";
  218.     cout << "-----------------------TOTAL-------------------------\n";
  219.     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 ;
  220.     cout << "Total                                        " << Jumlah;
  221.     cout << "\n";
  222.    
  223.     cout << "Uang Tunai : " ;
  224.     cin >> Tunai ;
  225.     cout << "\n";
  226.  
  227.     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 ;
  228.  
  229.     if (member == 'Y' || Jumlah_Pemesanan >= 10){
  230.         Disc = Jumlah * 25 / 100;
  231.         Harga_Disc = Jumlah - Disc;
  232.         cout << "Discount (25%)                               " << Harga_Disc;
  233.         cout << "\n";
  234.  
  235.         cout << "Kembali : " ;
  236.         Kembali = Tunai - Harga_Disc;
  237.         cout << "                               Rp. " << Kembali ;
  238.         cout << "\n";
  239.     } else {
  240.         cout << "Kembali : " ;
  241.     Kembali = Tunai - Jumlah;
  242.     cout << "                               Rp. " << Kembali ;
  243.     cout << "\n";
  244.     }
  245.  
  246.    
  247.    
  248.     cout << "------------TERIMAKASIH SUDAH BERKUNJUNG------------\n";
  249.     cout << "\n";
  250.     cout << "Input Ulang (y/n)" ;
  251.     cin >> ulang;
  252.    
  253.     cout << "\033[2J\033[1;1H";
  254.  
  255.     } while(ulang=='Y');
  256.  
  257.             cout<<"Tidak mengulang dan terima kasih\n";
  258.  
  259. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement