# C++ program -A company pays its employees according to the following formula: straight time: number

C++ program -A company pays its employees according to the following formula:

straight time: number of hours * rate of pay

overtime: 1.5 * number of over time hours * rate of pay

gross pay: straight time pay + rate of pay

Tax: 20% of the gross pay

Net pay: Gross pay – Tax

Calculate the gross and net pay for the employees shown in the table below hours worked normal working hours rate of pay 45 40 \$5.00 / hr 45 45 \$10.50 / hr 35 40 \$5.00 / hr 50 40 \$10.50 / hr 15 35 \$15.00 / hr 55 35 \$25.00 / hr Make up 4 more sets….

This my outffile for the data

numbers.txt

Hours Worked            Normal Working Hours       Rate of Pay

45 40 \$5.00 / hr

45 45 \$10.50 / hr

35 40 \$5.00 / hr

50 40 \$10.50

15 35 \$15.00

55 35 \$25.00 / hr

45 50 \$10.00 / hr

25 35 \$15.00 / hr

30 40 \$20.00 / hr

40 50 \$10.50 / hr

What i have so far

#include
#include
#include
using namespace std;

int main ()
{
float x;

ifstream infile;
infile open( “numbers.txt”);

if ( !infile.is_open() ) {
// The file could not be opened
cout
system (“PAUSE”);
exit (1)
}

infile >> x;
while (x >=0) {
cout
infile >> x;
} // end while

{
const float TAX= .20
float hoursWorked, normal hours, straight time, overtime;
float (x=1, x

overtime=hours worked – normal hours
if (overtime
overtime = 0;

system (“PAUSE”);
return EXIT_SUCCESS;
} // end main

i want the data to be read from the outfile it should look like this for the first set of data

Rate of Pay: \$5.00

Total Hours Worked: 45

Straight Time: 40

Over Time: 5

Gross Pay: \$237.50

Tax: \$47.50

Net Pay: \$190.00

Please finish the existing the program to make the rest of output look like that for the rest of the data