CALCULATNG

Mar 10, 2013 at 12:29am
How to calculate the commission of a person
problem.
calculates and display each sales person's commission, which is 10% of his or her sales. it should display the total commision but how???
I have to do first to enter the sales amount
like this code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
void per(int a );// calculate for 10% commission
void dispalycommission(int a); to display the commission
void totalcommission(int a); to calculate the totalcommision
int main()
{
int sales,totalc;
cout<<"Enter sales:";
cin>>sales;
totalc+=sales;
if(sales




I don't know how to calculate the total commission and i don't know if ther'es a condition for the 10%
pls help me
Mar 10, 2013 at 12:40am
closed account (3qX21hU5)
Take the total of the sale and multiply it by .10 and boom there is their commission for that sale. To get the total commission for all sales the person did keep track of how much they have sold and then multiply that number .10 and that is their total commission.
Last edited on Mar 10, 2013 at 1:00am
Mar 10, 2013 at 8:20am
i have a question about my function
this problem doesn't it have a parameter??
totalc+=sales*0.10
Mar 10, 2013 at 8:34am
1
2
3
4
5
float sales, commision;
cout << "Enter sales: ";
cin >> sales;
commision = sales * 0.1f;
cout << "Commision earned: " << commision;
Topic archived. No new replies allowed.