How do you calculate the following:

-Weekly Gross Wages
-Federal taxes
-Net Pay

I need to find out how to calculate these for a C++ program.

The program has to have the user enter the total hours worked and the pay rate. Then the program will take into account the overtime pay by multiplying the hours after 40 by 1.5.