MY CODE >> Sales Calculator
/*  Tommy Martin

    This program was designed to calculate the sales of a companies employees.
    The sales will also have a commision rate of %17

    HotTub.cpp
*/

#include<iostream>
#include<iomanip>

using namespace std;

int main()
{

	// Input variable to recognize sales person
	char name;

	// Input variables to recognize sale enter for each sales person
	double salesR = 0, salesJ = 0, salesN = 0;
	double totR = 0, totJ = 0, totN = 0;

	// Variables that will be used to monitor how many sales transactions are entered
	int transR = 1, transJ = 1, transN = 1;

	// Variables for commission constant and commission calculations
	const double RATE = .17;
	double commR = 0, commJ = 0, commN = 0;

	// Variable that will be used to calculate the average sales
	double aveR = 0, aveJ = 0, aveN = 0;

	// User instructions
	cout << "Instruction:\n"
         << "Please enter the first letter of the first name of the employee.\n"
         << "The employees recognized are Reid, Jarid, and Nicole.\n"
         << "Next, enter the empoyees sales.\n"
         << "Up to four sales transactions can be entered for each employee.\n"
         << "Once you are finished entering sales type Z when prompted to enter the \nsales person.\n"
         << "The employees sales, average sales, and commission will then be displayed.\n\n";

    // User input
	do {

		// Obtain user input for the name
		cout << "Please enter your sales person: "; cin >> name;
		cout << endl;

		// Verify that the name was entered correctly
		while ( !( name == 'r' ||
			   name == 'R' ||
			   name == 'j' ||
			   name == 'J' ||
			   name == 'n' ||
			   name == 'N' ||
			   name == 'z' ||
			   name == 'Z') )
		{
			cout << "Please enter a valid choice: "; cin >> name;
			cout << endl;
		}

		switch (name) {
			case 'r':	name = 'R';
			case 'R':
                // Verify no more than four transaction are entered
                if (transR < 5)
                {
                    cout << "Please enter sales for Reid: ";
                    cin >> salesR;
                    cout << endl;

                    // Verify that a non-negative number was entered
                    while (salesR < 0) {

                        cout << "Please enter a non-negative number: ";
                        cin >> salesR;
                        cout << endl;

                    }

                    // Add new number to existing number
                    totR += salesR;

                    // Used to keep track of how many time the user enters a numeber
                    transR++;
                }

                else {
                    cout << "You cannot enter more than four sales transactions per employee.\n\n";
                }

				break;

			case 'j':	name = 'J';
			case 'J':
                // Verify no more than four transaction are entered
                if (transJ < 5)
                {
                    cout << "Please enter sales for Jarid: ";
                    cin >> salesJ;
                    cout << endl;

                    // Verify that a non-negative number was entered
                    while (salesJ < 0) {

                        cout << "Please enter a non-negative number: ";
                        cin >> salesJ;
                        cout << endl;

                    }

                    // Add new number to existing number
                    totJ += salesJ;

                    // Used to keep track of how many time the user enters a numeber
                    transJ++;
                }

                else {
                    cout << "You cannot enter more than four sales transactions per employee.\n\n";
                }

				break;

			case 'n':	name = 'N';
			case 'N':
                // Verify no more than four transaction are entered
                if (transN < 5)
                {
                    cout << "Please enter sales for Nicole: ";
                    cin >> salesN;
                    cout << endl;

                    // Verify that a non-negative number was entered
                    while (salesN < 0) {

                        cout << "Please enter a non-negative number: ";
                        cin >> salesN;
                        cout << endl;

                    }

                    // Add new number to existing number
                    totN += salesN;

                    // Used to keep track of how many time the user enters a numeber
                    transN++;
                }

                else {
                    cout << "You cannot enter more than four sales transactions per employee.\n\n";
                }

				break;

			default:	break;
		}

	}	while ( !(name == 'z' || name == 'Z') );    // End User Entry

	// Calculate Sales and Commission
	for (int x = 0; x < 3; x++) {

		switch (x) {

            case 0:
                commR = totR * RATE;
                aveR = totR / transR;
                break;
            case 1:
                commJ = totJ * RATE;
                aveJ = totJ / transJ;
                break;
            case 2:
                commN = totN * RATE;
                aveN = totN / transN;
                break;

            default:    break;

		}

	}   // End Commission Calculation

    // Output sales report
    cout << endl << endl;
	cout << "------------------------------------------------------------\n\n";
	cout << "Total Sales, Average Sales, and Commission\n\n";
	cout << "Reid     Sales: " << fixed << setprecision(2) << totR << 
		"\n         Average Sales: " << aveR << "\n         Commission: " << commR << endl << endl;
	cout << "Jarid:   Sales: " << fixed << setprecision(2) << totJ << 
		"\n         Average Sales: " << aveJ << "\n         Commission: " << commJ << endl << endl;
	cout << "Nicole:  Sales: " << fixed << setprecision(2) << totN << 
		"\n         Average Sales: " << aveN << "\n         Commission: " << commN << endl << endl;
	cout << "------------------------------------------------------------\n\n";

    // Return zero becuase something must be returned
    return 0;

}