Pure Programmer
Blue Matrix

Cluster Map

Project: Combined FICA Tax (Command Line Argument)

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 variables for gross pay, net pay and total FICA tax. Be sure to initialize your variables. The gross pay variable should be set using a command line argment to the program. Then compute the FICA tax by multiplying FICA_RATE by your gross pay 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: CombinedFICATaxFormatted

$ g++ -std=c++17 CombinedFICATaxCmdLine.cpp -o CombinedFICATaxCmdLine -lfmt $ ./CombinedFICATaxCmdLine 1500 Gross Pay: 1500.00 FICA Tax: 114.75 Net Pay: 1385.25