You are using a version without Ads of this website. Please, consider donating:

### total commission

total_commission+=commission
Last edited on
`while( cin>>sales and sales >= 0 )// a negative number to terminate `
Last edited on
 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657`` `````` #include #include #include using namespace std; //Function Protypes void displayTotalSales(double & s1, double & s2, double & s3, double & s4); void calcSum(double & s1, double & s2, double & s3, double & s4); void calcCommission(double & s1, double & s2, double & s3, double & s4); void displayTotalCommission(double & s1, double & s2, double & s3, double & s4); //Begin Program int main() { double s1 = 0; double s2 = 0; double s3 = 0; double s4 = 0; displayTotalSales(s1, s2, s3, s4); cout << "The Total Sales Amounts: "; calcSum(s1, s2, s3, s4); cout << "1: " << s1 << endl << "2: " << s2 <> s1 >> s2 >> s3 >> s4; } //End Function //Begin calcSum Function void calcSum(double & s1, double & s2, double & s3, double & s4) { cout << s1 + s2 + s3 + s4 << endl; } //End Function //Begin CommissionPercentage Function void calcCommission(double & s1, double & s2, double & s3, double & s4) { cout.precision(5); int Commission = (s1 + s2 + s3 + s4) * .10; } //End Function //Begin displayTotalCommission Function void displayTotalCommission(double & s1, double & s2, double & s3, double & s4) { cout.precision(5); cout << "The Total Commission Amount is: \$"; cout << ((s1 + s2 + s3 + s4) * .10) + s1 + s2 + s3 + s4 << endl; //End Function system ("pause"); } //End Program ``````

where the loop that will aplly??
Topic archived. No new replies allowed.