Algorithm:
{Candidate Names:
Candidate Numbers:
Date created:
What does this program do? This pseudocode is an algorithm which will accept the names
of all seventeen sales staff members and their total sales for the month. This algorithmic
program must calculate the commission at 15% of their total sales amount.
}
program CaribbeanFashionStoreGenerator;
uses crt;
var
EmployeeName: string;
totalnumberofsales: real;
comm: real;
count, c, target: integer;
Begin
c:=1;
count:= 0;
target := 2500;
clrscr;
for c := 1 to 17 do
Begin
Writeln('Employee record: ', c);
Write('Please enter the employee name: ');
Readln(EmployeeName);
Write('Please enter the employee''s total sales:$ ');
Readln(totalnumberofsales);
If totalnumberofsales > target then
Begin
comm := 0.15*totalnumberofsales;
Write(EmployeeName, ' will receive a commission of: $ ', comm:0:2);
count := count + 1;
readln;
clrscr;
end
else
Begin
writeln(EmployeeName, ' is not entitled to a commission this month.');
readln;
clrscr;
end;
End;
Writeln('The total number of employees who will be receiving a commission this month
is: ',count);
End.
Screenshots: