I have attached the c++ code file and the header file I'm using to compile it.
The program has to take in employee details, and work out a wage slip from there.
The problem is from line 112 - 120, when the hours & overtime must be entered together.
Any hours over 37.5 need to be separated and declared as a separate variable. Then multiplied by the rate of pay. The variables must be declared separately because they are both used separately, they go on to multiply by separate rate of pay, the output for this is also spewed out like garbage! Apart from that the program runs fine and put out all the right figures.
Any help will be greatly appreciated!
if 40 hours are worked, it should calculate 37.5 at normal rate and 2.5 at overtime rate of time and a half.
if 37.5 hours are worked it should just calculate 37.5 * rate. However if 38 are worked, 0.5 hours should be paid at the overtime rate.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.