Answer to Question #328295 in C++ for Bareeq

Question #328295

Using the following chart




Sales




Commission




ratio




10%




15%




Less than 10000$




Greater than or equal




10000$ and less than




15000$




Greater than or equal 15000$




20%




Commission = sale * commission ratio




Sample Run:




enter the amount of your sales:




your commission is 1912.5

1
Expert's answer
2022-04-13T09:01:27-0400




#include <iostream>


using namespace std;


int main(){
	double sale,commissionRatio;




	cout<<"enter the amount of your sales: ";
	cin>>sale;


	if(sale<10000){
		commissionRatio=0.1;
	}else if(sale>10000 && sale<15000){
		commissionRatio=0.15;
	}else{
		commissionRatio=0.2;
	}


	double commission = sale * commissionRatio;


	cout<<"your commission is "<<commission<<"\n\n";
	system("pause");
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS