C++ Penjualan

#include <iostream>
#include <conio.h>
#include <math.h>
int main(){
//variable
    int gr = 9500000;
    int ag = 1500000;
    int ef =  700000;
    int bs = 4000000;
    int ab = 2000000;
    int mx = 3500000;
    int dr = 8000000;
    int mc =  200000;
    int kb = 2500000;
    int am = 3000000;
int x;
cout << "HARGA SATUAN" << endl;
cout << "" << endl;
cout << "Guitar            = "  << gr << endl;
cout << "Amply Guitar      = "  << ag << endl;
cout << "Effect Guitar     =  " << ef << endl;
cout << "Bass              = "  << bs << endl;
cout << "Amply Bass        = "  << ab << endl;
cout << "Mixer             = "  << mx << endl;
cout << "Drum              = "  << dr << endl;
cout << "Mic               =  " << mc << endl;
cout << "Keyboard          = "  << kb << endl;
cout << "Amply             = "  << am << endl;
cout << "" << endl;
cout << "PILIHAN PAKET" << endl;
cout << "" << endl;
cout << "PAKET 1 = Guitar + Amply Guitar + Effect Guitar (Diskon 20%)" << endl;
cout << "PAKET 2 = Bass + Amply Bass (Diskon 10%)" << endl;
cout << "PAKET 3 = Complete (Diskon 30%)" << endl;
cout << "" << endl;
cout << "Anda memilih pilih paket 1" <<endl;
cout << "Bila tidak ingin membeli, nasukkan 0" <<endl;
cout << "Berapa banyak yang akan anda beli? ";
cin >> x;
cout<<endl;
int a = x*(gr+ag+ef);
int b = x*((gr+ag+ef)-(gr+ag+ef)*20/100);
cout << "PAKET 1" << endl;
cout << "Total Harga        " << a << endl;
cout << "Setelah di Diskon  " << b << endl;
cout << "" << endl;
cout << "Anda memilih pilih paket 2" <<endl;
cout << "Bila tidak ingin membeli, nasukkan 0" <<endl;
cout << "Berapa banyak yang akan anda beli? ";
cin >> x;
cout<<endl;
int c = x*(bs+ab);
int d = x*((bs+ab)-(bs+ab)*10/100);
cout << "PAKET 2" << endl;
cout << "Total Harga        " << c << endl;
cout << "Setelah di Diskon  " << d << endl;
cout << "" << endl;
cout << "Anda memilih pilih paket 3" <<endl;
cout << "Bila tidak ingin membeli, nasukkan 0" <<endl;
cout << "Berapa banyak yang akan anda beli? ";
cin >> x;
cout<<endl;
int e = x*(gr+ag+ef+bs+ab+mx+dr+mc+kb+am);
int f = x*((gr+ag+ef+bs+ab+mx+dr+mc+kb+am)-(gr+ag+ef+bs+ab+mx+dr+mc+kb+am)*30/100);
cout << "PAKET 3" << endl;
cout << "Total Harga        " << e << endl;
cout << "Setelah di Diskon  " << f << endl;
cout << "" << endl;
cout << "" << endl;
cout << "Total belanja      " << b+d+f << endl;
cout << "Uang anda?         ";
cin >> x;
cout << endl;
cout << "Kembalian          "<< x-(b+d+f) << endl;
   cout << "" << endl;
cout << "TERIMAKASIH" << endl;

   getch();
   return 0;

}

0 Response to "C++ Penjualan"

Posting Komentar