0% found this document useful (0 votes)
15 views

Pseudocode Start: //declaration of Variables

This pseudocode accepts the names and total sales of 5 staff members, calculates their commission at 5% of sales, and identifies the staff member with the highest commission. It initializes variables to store names, sales, and commissions. A for loop runs 4 times to input each staff member's name and sales, calculate their commission, and update the highest commission and name. Finally, it prints the name of the staff member with the highest commission.

Uploaded by

Tony Gonzalez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Pseudocode Start: //declaration of Variables

This pseudocode accepts the names and total sales of 5 staff members, calculates their commission at 5% of sales, and identifies the staff member with the highest commission. It initializes variables to store names, sales, and commissions. A for loop runs 4 times to input each staff member's name and sales, calculate their commission, and update the highest commission and name. Finally, it prints the name of the staff member with the highest commission.

Uploaded by

Tony Gonzalez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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