![]() |
Insurance and payroll code
I'm just sort of begginning here and this C++ stuff is overwhelming.
Let's see I'm trying to make a code file where I would need to calculate a pay rate based on the person's position. Then that said function should calculate the gross pay (rate *hours worked). The function should return gross pay to the main routine. I would aslo need an Insurance function for Determining the insurance rate based on the type. I think I might have to use an array here in the main routine and pass it to this function. Then calculate the insurance deduction based on the rate times the gross pay and return insurance deduction to main routine. I'm thinking something should look/involve this. Positions: Rate: M = Manager........................................... .............. 40.00 S = Supervisor .................................................. .... 20.00 E = Employee .................................................. ..... 10.00 Insurance Type: Rate: 1 = Single .................................................. .............. 0.02 2 = Single with children ........................................... 0.03 3 = Married........................................... ................... 0.04 4 = Married with Children ........................................ 0.05 Bonus: Rate: Gross >= 5000 ................................................ 1000.00 Gross is equal to 3000 and <=4999 ................... 600.00 Gross < 3000 .................................................. ...... 0.00 Tax: Rate: Gross >= 7000 .................................................. ...... 0.15 Gross is equal to 4000 and <= 6999 ..................... 0.10 Gross is equal to 2000 and <= 3999 ..................... 0.05 Gross is < 2000 .................................................. ... 0.00 Miscellaneous: Rate: Medicare deduction ........................................... 100.00 Social Security Tax ............................................... 0.05 and here's some code I have where I attempted this. Code:
#include <iostream> |
Re: Insurance and payroll code
What input did you give the program, and what output did you get?
|
| All times are GMT +5.5. The time now is 05:25. |