Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE NEED HELP, NEED IN C++ AND IN FUNCTIONS 1. (Salesperson Salary Ranges) A

ID: 2990913 • Letter: P

Question

PLEASE NEED HELP, NEED IN C++ AND IN FUNCTIONS

1. (Salesperson Salary Ranges) A 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 grosses $5000 in sales in a week receives $200 plus 9 percent of $5000, or a total of $650.

Write a FUNCTION GetWage that asks user to input gross sales and calculates employee salary based on input. Write another function Display that displays table of salary ranges and number of employees in each range. Write a program (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson

Explanation / Answer

#include<iostream>
using namespace std;

int main()
{
   int earned;
   int i=0;
   const int size=8;
   while(i<size)
   {
       int grossSales;
   cout<<"Enter the Gross sales for this week: ";
   cin>>grossSales;
   earned=((grossSales*9)/100)+200;
   cout<<"The sales person earned this week in range: ";

       if(earned>=200 && earned<300)
           cout<<"$200-$299"<<endl;

       if(earned>=300 && earned<400)
           cout<<"$300-$499"<<endl;

       if(earned>=400 && earned<500)
           cout<<"$400-$599"<<endl;

       if(earned>=500 && earned<600)
           cout<<"$500-$699"<<endl;

       if(earned>=600 && earned<700)
           cout<<"$600-$799"<<endl;

       if(earned>=700 && earned<800)
           cout<<"$700-$899"<<endl;

       if(earned>=800 && earned<900)
           cout<<"$800-$999"<<endl;

       if(earned>=1000)
           cout<<"$1000 and over"<<endl;
   i++;
   }
   return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote