Problem

The data entry clerk is requirTom’s Paper Company Ltd wants to produce a payroll register using a program.ed to enter data for each employee, which comprises of: the employee number (integer), the employee last name (string), the hours worked that week (integer), and the rate of pay per hour (real number), and the percentage (%) of income tax paid by the company on behalf of the worker (integer). The last employee entry contains the number -999 only, which is used as a sentinel to mark the end of all the employee data. The gross pay for each employee is to be calculated as hours worked multiplied by the rate of pay. The total vat paid by the company is 15 percent of the gross pay.

What is your SUBJECT? (not the initials of your school or whatever UWI is)

To write a program to calculate the payroll register, you can follow these steps:

1. Initialize variables:
- Set totalVatPaid to 0 (this will be used to accumulate the total VAT paid by the company).
- Set totalGrossPay to 0 (this will be used to accumulate the total gross pay for all employees).

2. Start a loop to enter employee data:
- Prompt the data entry clerk to enter the employee number (integer). Save it in a variable, let's say "employeeNumber".
- Check if the "employeeNumber" is equal to -999. If yes, break the loop to end the data entry.
- Prompt the data entry clerk to enter the employee last name (string). Save it in a variable, let's say "lastName".
- Prompt the data entry clerk to enter the hours worked that week (integer). Save it in a variable, let's say "hoursWorked".
- Prompt the data entry clerk to enter the rate of pay per hour (real number). Save it in a variable, let's say "rateOfPay".
- Prompt the data entry clerk to enter the percentage (%) of income tax paid by the company on behalf of the worker (integer). Save it in a variable, let's say "taxPercentage".

3. Calculate the gross pay for the current employee:
- Multiply the "hoursWorked" by the "rateOfPay" and save the result in a variable, let's say "grossPay".
- Accumulate the "grossPay" into the "totalGrossPay".

4. Calculate the VAT paid by the company:
- Multiply the "grossPay" by 0.15 (15% VAT) and save the result in a variable, let's say "vatPaid".
- Accumulate the "vatPaid" into the "totalVatPaid".

5. Print the employee data:
- Print the employee number, last name, hours worked, rate of pay, gross pay, and VAT paid for the current employee.

6. Repeat steps 2 to 5 until the sentinel value (-999) is entered.

7. Print the totals:
- Print the total gross pay for all employees.
- Print the total VAT paid by the company.

That's it! You now have the steps to write a program to calculate the payroll register for Tom's Paper Company Ltd.