. Develop an algorithm pseudo-code or flowchart that will accept the names of each sales

staff members and their total sales for the month. The algorithm must calculate the

commission at 5 % of their total sales amount. It should display only the name, total

sales and commission of the staff member with the highest commission.

1 answer

maxname=""
maxsales=0
maxcomm=0
name="x" ; stop reading on a blank line

while name ≠ "" {
  read name,sales
  comm = sales*0.05
  if comm > maxcomm {
    maxname=name
    maxsales=sales
    maxcom=comm
  }
}
display maxname,maxsales,maxcomm