This must be written in C++. A company pays its salespeople on a commission basi
ID: 3584646 • Letter: T
Question
This must be written in C++. A company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus a 9 percent commission of their gross sales for the sales period. For example, a salesperson who grosses $5000 in sales in the period receives $200 plus 9% of $5000 or a total of $650. Write a program that determines for each sales person their total sales and their salary. There are 5 salesperson for the company. You are to write from and too a txt file which contains the information for all 5 sales people. The file contains the salesperson's number 1-5 with numerous sales. List each person's number, their total sales and their salary for the period in a nice table format ,(The columns must line up) Restrictions: NO ARRAYS, use a switch statement and use functionsExplanation / Answer
i assumed their salaries in these ranges and the programme is
public class Question7539 {
static int[] Salary = {750, 1200, 5000, 7575, 10000, 9250, 12500, 3560, 4800};
public static void main(String[] args) {
for(int i=0; iSystem.out.println((i+1)+": "+(200+0.09*Salary[i])+"$");
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.