Answer to Question #124369 in C++ for Wilfred donkor

Question #124369
1. One large chemical company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9 percent of $5000, or a total of $650. Develop a C++ program inputs each salesperson's gross sales for last week and calculates and displays that salesperson's earnings. Process one salesperson's figures at a time
1
Expert's answer
2020-06-29T08:18:05-0400
#include <iostream>
using namespace std;
int main(){
    int n;
    double s = 0;


    cout << "Input count of salespeople: "; cin >> n;
    for(int i = 0; i < n; i++){
        cout << "Input " << (i + 1)  << "-salesperson' gross sales: "; cin >> s;
        cout << "Earnings: " << (200 + s * 0.09) << "$" << endl;
    }
}

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