In: Computer Science
Develop an algorithm and a flowchart for the following:
Problem Specification:
Jennifer Camacho It’s the owner of Amazing Toyota, a company that sells this type of cars in Puerto Rico. She wants a program that displays the amount of salespersons commission. Some companies use a fixed rate to calculate the commission, while others (like Amazing Toyota) use a rate that varies with the amount of sales. If The salesperson sales $15,000 in one moth his commission will be a 2 % of the sell, if they sell $25,000 one moth, they are getting a 5% of the sales commission fee and if they sell $55,000, they are getting 10% of sell.
Algorithm:
// Algorithm to compute and display the amount of salespersons
commission
Declaration
   number sales, commission;
  
Start
   Input sales ; // Input of sales for the salesperson
in one month;
  
   // Compute the commission based on the sales by
salesperson in the month
  
   // check if sales of the salesperson is greater than
or equal to 55,000 for the month
   if sales >= 55000 then
       commission = sales * 0.1; // then
commission will be 10%
   // check if sales of the salesperson is greater than
or equal to 25,000 for the month  
   else if sales >= 25000 then
       commission = sales * 0.05; // then
commission will be 5%
   // check if sales of the salesperson is greater than
or equal to 15,000 for the month  
   else if sales >=15000
       commission = sales * 0.02; // then
commission will be 2%
   // check if sales of the salesperson is less than
15,000 for the month
   else
       commission = 0; // commission =
0
   end if
  
   // display the commission for the salesperson
   Display commission;
  
End  
Flowchart:

