C++ Program one large chemical company pays its salespeople on a commission basis

C++ Program one large chemical company pays its salespeople on a commission basis

C++ Program one large chemical company pays its salespeople on a commission basis

Object:

One large chemical company pays its salespeople on a commission basis. The salespeople 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 that uses a while structure to input each salesperson’s gross sales for last week and calculate and display that salesperson’s earnings. Process one salesperson’s figures at a time.

C++ Program one large chemical company pays its salespeople on a commission basis

Code:

#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
       double sale, com, earn;
       while (true)
       {
             cout<<“Enter Sales in Dollars (-1 to end): “;
             cin>>sale;
             if(sale== -1)
             {
                   break;
             }
             com = sale / 100 * 9;
             earn = com + 200;
             cout<<“Salary is: $”<<earn<<endl;
       }
       getch();
}

Output:

C++ Program one large chemical company pays its salespeople on a commission basis

Another Project : Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liquid, solid, or gaseous

M.A Siddiqui

Hi, I am M.A Siddiqui. I'm a Computer Science Student, In this website, I'm teaching you Multiple languages and provides Projects and other Subjects Notes.

You may also like...

1 Response

  1. June 14, 2020

    […] C++ Program one large chemical company pays its salespeople on a commission basis […]

Leave a Reply

Your email address will not be published. Required fields are marked *