Study the algorithm below and then modify the algorithm to


This question provides you with an opportunity to examine an algorithm, identify the inaccuracies in the algorithm, and finally, to modify the algorithm with the correct details.

1. Study the algorithm below and then modify the algorithm to print the sales amount for all ten salespersons. Review the algorithm, identify the inaccuracies, insert the corrections, save the document, and submit the document for grading.

repeat 5 times:
get the salesperson's name and sales amount
calculate the bonus amount by multiplying the sales amount by 3%
print the salesperson's name and bonus amount
end repeat

2. Modify the following algorithm to include the repetition structure. Review the algorithm, identify the inaccuracies, insert the corrections, save the document, and submit the document for grading.

walk forward 1 step,
walk forward 1 step,
if a flower is present, do this:
pick up the flower
end if
turn left 45 degrees
turn left 45 degrees

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Study the algorithm below and then modify the algorithm to
Reference No:- TGS01590912

Now Priced at $30 (50% Discount)

Recommended (90%)

Rated (4.3/5)