Answer to Question #202415 in C++ for Rajay Myrie

Question #202415

Write a pseudocode that will allow a retail store to process the monthly commission that will be paid to their employees. Your solution will accept the total employees to be processed, and then produce an output showing the commission to be given for each employee, after accepting their name, Taxpayer Registration Number (TRN) and total sales for the month. A 10% commission is given if the total monthly sales is 100,000 or less; however, if the total monthly sales amount exceeds 100,000, the employee gets a commission of 8% of the amount up to and including 100,000 as well as 20% of the amount exceeding 100,000.


1
Expert's answer
2021-06-03T02:37:00-0400
#include <iostream>
#include <string>
 
using namespace std;
 
int main()
{
	int count = 0;
	cout << "Enter quantity of employees: ";
	cin >> count;
	string name, TRN;
	double total;
	for (int i = 0; i < count; i++)
	{
		cout << "Enter employee name: ";
		cin >> name;
		cout << "Enter employee TRN: ";
		cin >> TRN;
		cout << "Enter employee total sales for the month: ";
		cin >> total;
		cout << "Name is: " << name << " TRN is: " << TRN << " Comission is: $";
		if (total <= 100000)
		{
			cout << total * 0.1 << endl;
		}
		if (total > 100000)
		{
			cout << 100000 * 0.08 + (total - 100000) * 0.2 << endl;
		}
	}
	system("pause");
	return 0;
}

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