Design an algorithm that will prompt for, receive and total a collection of payroll amounts

entered at the terminal until a sentinel amount of 999 is entered. After the sentinel has
been entered, display the total payroll amount to the screen.

To solve this problem, you can use a loop to repeatedly prompt for and receive payroll amounts from the user. Inside the loop, you can keep a running total of the payroll amounts entered.

Here's an algorithm that outlines the steps to do this:

1. Initialize a variable total_payroll to 0.
2. Create a loop that continues until a sentinel value of 999 is entered:
a. Prompt the user to enter a payroll amount.
b. Read the payroll amount from the user.
c. If the payroll amount is equal to the sentinel value (999), exit the loop.
d. Convert the payroll amount to a numeric value if necessary.
e. Add the payroll amount to the total_payroll variable.
3. Display the total_payroll amount to the screen.

Here's the algorithm in pseudocode:

total_payroll = 0
payroll_amount = 0

loop:
display "Enter a payroll amount (or enter 999 to stop):"
read payroll_amount

if payroll_amount == 999:
break

payroll_amount = convert_to_numeric(payroll_amount)
total_payroll = total_payroll + payroll_amount

display "Total payroll amount:", total_payroll

By following this algorithm and implementing it in a programming language of your choice, you should be able to prompt for, receive, and total a collection of payroll amounts until the sentinel value of 999 is entered. Finally, you can display the total payroll amount to the screen.

To design an algorithm for the given task, you can follow these steps:

1. Initialize a variable called "totalPayroll" to 0 to keep track of the total payroll amount.

2. Create a loop that will iterate until the sentinel amount of 999 is entered.

3. Inside the loop, prompt the user to enter a payroll amount.

4. Read and store the entered payroll amount in a variable, let's call it "payrollAmount".

5. Check if the entered payroll amount is equal to the sentinel value of 999. If it is, exit the loop.

6. Add the payrollAmount to the totalPayroll variable.

7. Repeat steps 3 to 6 until the sentinel value (999) is entered.

8. Once the loop is exited, display the totalPayroll amount to the screen.

Here's the algorithm in a more structured format:

```
totalPayroll = 0
payrollAmount = 0

loop:
prompt for payrollAmount
read payrollAmount

if payrollAmount == 999:
exit loop

totalPayroll = totalPayroll + payrollAmount

display totalPayroll
```

This algorithm will keep summing the payroll amounts entered by the user until the sentinel value (999) is entered, and finally display the total payroll amount to the screen.