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++ projects for beginners with source code

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();
}

#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

No.C++ Projects for beginners with Source Code
1Write a C++ program to check triangle by entering 3 angles
2Write a C++ program that asks for the number of units sold and computes the total cost of the purchase.
3Write a program that asks the user to enter a number of seconds.
4Write a C++ program that will ask user to enter two integral numbers. The numbers should be swapped without using any third variable.
5Write a C++ program which takes the price of bakery items ranging from 0-999
6Write a C++ Program to print the bill.

1 thought on “C++ Program one large chemical company pays its salespeople on a commission basis”

  1. Pingback: C++ projects for beginners with source code - Codeboks

Leave a Comment

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