Answer to Question #265190 in C for Ally

Question #265190

One large chemical company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a program that will prompt the user for a salesperson’s gross sales and will calculate and display that salesperson's earnings. Process one salesperson's figures at a time, use the sentinel value -1 to terminate the program. A sample input/output dialog for the program is below:


1
Expert's answer
2021-11-12T16:30:00-0500
#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