Question : 6
Write a program to input sales and print the total commission on it by using the slab given
below :
[15]
SALES
COMMISSION
15%
10%
30001 onwards
22001 - 30000
12001-22000
5001-12000
below 5001
7%
3%
NIll
Answers
Answered by
1
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