Write a program to calculate commission for the salesmen. The commission is calculated
according to following rates :
Sales
30001 onward
22001-30000
12001-22000
5001-12000
0-5000
Commision Rate
15%
10%
7%
3%
0%
Answers
Answered by
6
Answer:
*To calculate commission for a salesman. The commission is calculated according to the flg rates:
30001 onwards: 15%
22001-30000: 10%
12001-22000: 7%
5001 -12000: 3%
00000-5000: 0%*/
#include<iostream>
using namespace std;
int main()
{
double sales,comm;
cout<<“Enter the sales made by the salesman:\n”;
cin>>sales;
if((sales>=0)&&(sales<=5000))
comm=0;
if((sales>5000)&&(sales<12000))
comm=sales*0.03;
if((sales>12000)&&(sales<22000))
comm=sales*0.07;
if((sales>22000)&&(sales<30000))
comm=sales*0.10;
if(sales>30000)
comm=sales*0.15;
cout<<“\nThe commission is: “<<comm<<“\n”;
return 0;
}
Similar questions
Math,
2 months ago
Psychology,
2 months ago
English,
2 months ago
Hindi,
4 months ago
Science,
4 months ago
Science,
10 months ago
India Languages,
10 months ago