Pure Programmer
Blue Matrix

Cluster Map

Project: Combined FICA Tax (Formatted)

Write a program that computes the Social Security and Medicare tax on your paycheck. Creates a floating point constant named FICA_RATE with the value 0.0765. Create constant for gross pay and variables for net pay and total FICA tax. Be sure to initialize your variables. The gross pay constant should be initialized to your weekly pay amount. Then compute the FICA tax by multiplying FICA_RATE by your gross pay (using * as the symbol for multiplication) to initialize the FICA tax variable. Then compute net pay by subtracting the FICA tax from gross pay. Print the gross pay, total FICA tax and net pay formatted to two decimal places.

See: CombinedFICATax

$ g++ -std=c++17 CombinedFICATaxFormatted.cpp -o CombinedFICATaxFormatted -lfmt $ ./CombinedFICATaxFormatted Gross Pay: 1000.00 FICA Tax: 76.50 Net Pay: 923.50