/*
 * PROGRAMMED BY : Jacob Silvestre
 * CLASS         : CSC5
 * SECTION       : MW - 2:20 - 6:30p
 * ASSIGNMENT #1 : Basic Input / Output
 */

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;

int main()
{
    // Constants
    const int NUM_PEOPLE = 3;
    const double MONTHS_PER_YEAR = 12.0;
    const double RETRO_MONTHS = 6.0;

    // Variables
    string name;
    double currentSalary;
    double payIncrease;
    double newSalary;
    double monthlySalary;
    double retroactivePay;

    // Class heading
    cout << "****************************************************" << endl;
    cout << "*  PROGRAMMED BY : Jacob Silvestre" << endl;
    cout << "*  CLASS         : CSC5" << endl;
    cout << "*  SECTION       : MW - 2:20 - 6:30p" << endl;
    cout << "*  ASSIGNMENT #1 : Basic Input / Output" << endl;
    cout << "****************************************************" << endl;
    cout << endl;

    for (int count = 1; count <= NUM_PEOPLE; count++)
    {
        // Input
        cout << "What is your name? ";
        getline(cin, name);

        cout << "What is your current salary? ";
        cin >> currentSalary;

        cout << "What is your pay increase? ";
        cin >> payIncrease;

        // Calculations
        newSalary = currentSalary + (currentSalary * payIncrease);

        monthlySalary = newSalary / MONTHS_PER_YEAR;

        retroactivePay =
            (newSalary - currentSalary) /
            MONTHS_PER_YEAR * RETRO_MONTHS;

        // Output
        cout << endl;
        cout << name << "'s SALARY INFORMATION" << endl;

        cout << left
             << setw(20) << "New Salary"
             << setw(20) << "Monthly Salary"
             << setw(20) << "Retroactive Pay"
             << endl;

        cout << fixed << setprecision(2);

        cout << right
             << setw(10) << newSalary
             << setw(20) << monthlySalary
             << setw(20) << retroactivePay
             << endl;

        cout << endl;
        cout << "<Press enter to continue>";

        cin.ignore();
        cin.get();

        cout << endl << endl;
    }

    return 0;
}