//HITUNG KOMISI UNTUK PEKERJA MARKETING
//By marithavionika
so here's my first post about C++. just realised I've got something nice to share ;) anything you ask, do comment below na !
#include<iostream>
using namespace std;
main(){
char nama[225],g;
int kd,bonus,tot;
int tp,lebih;
const int A=10000000;
const int B=25000000;
const int C=50000000;
const int D=100000000;
cout<<"Masukkan nama :";cin>>nama;
cout<<"masukkan golongan : ";cin>>g;
cout<<"Masukkan Total penjualan : ";cin>>tp;
if(g=='A')
{
cout<<"Target Penjualan : "<<A<<endl;
if(tp>A){
lebih=tp-A;
cout<<"Kelebihan penjualan :"<<lebih<<endl;
}
else
lebih=0;
}
else if(g=='B')
{
cout<<"Target penjualan : "<<B<<endl;
if(tp>B){
lebih=tp-B;
cout<<"Kelebihan penjualan :"<<lebih<<endl;
}
else
lebih=0;
}
else if(g=='C')
{
cout<<"Target Penjualan : "<<C<<endl;
if(tp>C){
lebih=tp-C;
cout<<"Kelebihan penjualan :"<<lebih<<endl;
}
else
lebih=0;
}
else if(g=='D')
{
cout<<"Target penjualan : "<<D<<endl;
if(tp>B){
lebih=tp-B;
cout<<"Kelebihan penjualan :"<<lebih<<endl;
}
else
lebih=0;
}
else
cout<<"GOLONGAN TAK TERDAFTAR...";
kd=0.05*tp;
cout<<"Komisi dasar : "<<kd<<endl;
if(lebih<25000000)
bonus=0.03*lebih;
else if(lebih<50000000)
bonus=0.05*lebih;
else if(lebih<100000000)
bonus=0.07*lebih;
else if(lebih>100000000)
bonus=0.1*lebih;
cout<<"Bonus : "<<bonus<<endl;
tot=kd+bonus;
cout<<"Total Bonus : "<<tot<<endl;
system("pause");
}
No comments:
Post a Comment