aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-02-13 14:35:52 -0600
committerMatthew Strapp <msattr@gmail.com>2019-02-13 14:35:52 -0600
commitd69b112716ae553f9309f59dbd6392e42f1ff597 (patch)
tree99bd2e8b0a843e8a48da7fb42cf9dce928eb86b9 /ee1301/wk2
parent*Meaningful comments intensify* (diff)
downloadhomework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar.gz
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar.bz2
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar.lz
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar.xz
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.tar.zst
homework-d69b112716ae553f9309f59dbd6392e42f1ff597.zip
Fix variable names for clarity
Diffstat (limited to '')
-rw-r--r--ee1301/wk2/lab2/strap012_lab2_pay_stub.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ee1301/wk2/lab2/strap012_lab2_pay_stub.cpp b/ee1301/wk2/lab2/strap012_lab2_pay_stub.cpp
index e9fabaf..1a1ae4e 100644
--- a/ee1301/wk2/lab2/strap012_lab2_pay_stub.cpp
+++ b/ee1301/wk2/lab2/strap012_lab2_pay_stub.cpp
@@ -14,7 +14,7 @@ using namespace std;
int main () {
int dependents, Hours;
int OT = 0; int Health = 0; //Set values to zero to prevent problems
- double SSI, MN, Fed, GrossPay, NetPay;
+ double SSI, State, Fed, GrossPay, NetPay;
cout << "How many hours did you work this week?: ";
cin >> Hours;
cout << "How many dependents do you have?: ";
@@ -28,13 +28,13 @@ int main () {
GrossPay = Hours * 16.78 + OT * 16.78 * 1.5;
SSI = GrossPay * 0.06;
Fed = GrossPay * 0.14;
- MN = GrossPay * .05;
- NetPay = GrossPay-SSI-Fed-MN-Health-10; //$10 union dues
+ State = GrossPay * .05;
+ NetPay = GrossPay-SSI-Fed-State-Health-10; //$10 union dues
cout << fixed << setprecision(2) << "Your gross (before withholdings) pay is $" << GrossPay << "." << endl
<< "Social Security withholding: $" << SSI << endl
<< "Federal income tax withholding: $" << Fed << endl
- << "State income tax withholding: $" << MN << endl
+ << "State income tax withholding: $" << State << endl
<< "Union Dues: $10" << endl
<< "Medical cost: $" << Health << endl