You are on page 1of 2

pseudocode

Start
Variables
//declaration of variables
staff_name :array [15] as string //to store staff members names
sale_total: array [15] as integer //to store total sales for staff
commission:array [15] as real // to store the commission for all staff
high_comm, comm, as real
s_name as string
sale_tot as integer

//this section will give a start value for high_comm and high_name
Print Enter name of staff
Read s_name
Print Enter total sales for staff member
Read sale_tot

comm = sale_tot * 0.05


high_comm = comm
high_name = s_name

//this for loop will run 4 times to accept all members of staff name
and total sales
For i:= 1 to 5 do
Print Enter name of staff
Read staff_name[x]
Print Enter total sales for staff member
Read sale_total[x]

//calculation of commission
commission[x] = sale_total[x] * 0.05
//passes highest commission to the variable high_comm
if commission[x] > high_comm then
high_comm = commission[x]
high_name = Staff_name[x]
end for
Print high_name, has the high commission of , high_comm
Stop

You might also like