@anonymous/

# TrueHonestPython

## No description

Files
• main.cpp
main.cpp
```1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
```
```/*
Problem: Calculate and print the monthly paycheck for an employee given a list of deductions.

Algorithm
1. Get Employee Name
2. Get Gross Income
3. Calculate all deductions
4. Output all deductions to two decimal places
a. Left align name of all outputs
b. Right align all numerical values with their respective name
*/

#include <iostream>
#include <string>
#include <iomanip>

using namespace std;

int main()
{

//Variable Declaration and Initialization

string employeeFullName;
double grossIncome;
double fedTax = .15;
double fedDeduction;
double stateTax = .035;
double stateDeduction;
double ssTax = .0575;
double ssDeduction;
double medTax = .0275;
double medDeduction;
double pensionTax = .05;
double pensionDeduction;
double healthInsurance = 75.00;
double netPay;

//Input

cout << "==================================" << endl;
cout << "Description: Employee Paycheck" << endl;
cout << "School: Long Beach City College" << endl;
cout << "Author: Christian Araya" << endl;
cout << "Date: March 1st 2018" << endl;
cout << "Program: CArayaProject3" << endl;
cout << "==================================\n" << endl;

cout << "Please Enter Employee's Full Name:" << endl;
getline(cin, employeeFullName);
cout << "Please Enter Employee's Gross Income (ex. 75876.34):" << endl;
cin >> grossIncome;

//Process
fedDeduction = grossIncome * fedTax;
stateDeduction = grossIncome * stateTax;
ssDeduction = grossIncome * ssTax;
medDeduction = grossIncome * medTax;
pensionDeduction = grossIncome * pensionTax;
netPay = grossIncome - fedDeduction - stateDeduction - ssDeduction - medDeduction - pensionDeduction;

//Output

cout << "***********************************************************" << endl;
cout << "Net Pay is calculated after taking the following deductions" << endl;
cout << "Federal Income Tax: 15%" << endl;
cout << "State Tax: 3.5%" << endl;
cout << "Social Security Tax: 5.75%" << endl;
cout << "Medicare/Medicaid Tax: 2.75%" << endl;
cout << "Pension Plan: 5%" << endl;
cout << "Health Insurance: \$75.00" << endl;
cout << "***********************************************************\n\n\n" << endl;

cout << "TOTAL DEDUCTIONS for " << employeeFullName << endl;
cout << "----------------------------------------------------" << endl;
cout << fixed << setprecision(2);
cout << setfill('.') << setw(40) << left << "Gross Amount: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << grossIncome << endl;
cout << setfill('.') << setw(40) << left << "Federal Tax Deduction: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << fedDeduction << endl;
cout << setfill('.') << setw(40) << left << "State Tax Deduction: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << stateDeduction << endl;
cout << setfill('.') << setw(40) << left << "Social Security Tax Deduction: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << ssDeduction << endl;
cout << setfill('.') << setw(40) << left << "Medicare/Medicaid Tax Deduction: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << medDeduction << endl;
cout << setfill('.') << setw(40) << left << "Pension Plan Deductions: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << pensionDeduction << endl;
cout << setfill('.') << setw(40) << left << "Health Insurance Deduction: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << healthInsurance << endl;
cout << setfill('.') << setw(40) << left << "Net Pay: "
<< setw(2) << " \$"
<< setfill(' ') << setw(8) << right << netPay << endl;

return 0;
}```