/****************************************************************************** * This program computes FICA taxes. * * Copyright © 2017, 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include using namespace std; static double const SS_TAX_RATE = 0.062; static double const MEDICARE_TAX_RATE = 0.0145; static double const ANNUAL_SALARY = 60000.0; int main(int argc, char **argv) { double const GROSS_PAY = ANNUAL_SALARY / 12.0; double const SS_TAX = GROSS_PAY * SS_TAX_RATE; double const MEDICARE_TAX = GROSS_PAY * MEDICARE_TAX_RATE; double const NET_PAY = GROSS_PAY - SS_TAX - MEDICARE_TAX; cout << fmt::format("Gross Pay: ${0:.2f}", GROSS_PAY) << endl; cout << fmt::format("Social Security Tax: ${0:.2f}", SS_TAX) << endl; cout << fmt::format("Medicare Tax: ${0:.2f}", MEDICARE_TAX) << endl; cout << fmt::format("Net Pay: ${0:.2f}", NET_PAY) << endl; return 0; }