Modify the algorithm to print the sales amount

Assignment Help Data Structure & Algorithms
Reference no: EM131207165

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

Reference no: EM131207165

Questions Cloud

Premium versus discount : In reviewing the Becker materials, the lecture, and your eBook reading for this week, there are several considerations. First being the issue price of the bonds payable.
Analyse the assumptions behind public interest : In your accounting career you will be required to analyse current accounting issues and communicate your theoretical understanding to your professional colleagues and your clients. For this assignment assume that you are the senior accountant work..
What are two reasons carbomethoxy group is a meta director : What are two reasons the carbomethoxy group is a meta director. Name the three possible side products of the reaction and state how they are removed.
Calculate the average total cost : The table shows output and cost data. Calculate the average total cost, average fixed cost, average variable cost, and marginal cost schedules. If the price were $500, should the firm shut down in the short run? In the long run?
Modify the algorithm to print the sales amount : 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.
How many cubic meters of seawater would have a gold : According to estimates, 1.0L of seawater contains on the average 4.0x10-9 g of gold. If gold is worth $390 per troy ounce and a troy ounce weighs 31.103 g , how many cubic meters of seawater would have a million dollars worth of gold in it?
Determine the margin percentage : To determine the margin percentage, it does not matter whether the buy and sell prices include or exclude GST provided it is the same (include or exclude GST) for both figures.
Case exercises-passing along costs : Not only must a manager understand how costs relate to the final product, but he must also understand the circumstances in which costs may change, and what must be done when this happens.
What is the sinusoidal expression for the voltage : The current through a 0.5-mF capacitor is given. What is the sinusoidal expression for the voltage?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  The time delay of a long-distance

The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee.

  1 describe the differences between our specifications of

1. describe the differences between our specifications of the sorted list adt and the binary search tree adt. 2. write

  Give an efficient algorithm that takes as input a pattern

Give an efficient algorithm that takes as input a pattern P [1..m]and computes the value ρ(Pi) for i = 1,2,...,m. What is the running time of your algorithm?

  Explain compression algorithms are often used in forensics

"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.

  Threat model to describe risk of attack vector

Construct a simple threat model that describes the risk this represents: attacker(s), attack vector, vulnerability, assets, and likelihood of occurrence, likely impact, and plausible mitigations.

  Construct two gene expression clustering algorithms using r

CLUSTERING GENE EXPRESSION DATA USING R LANGUAGEConstruct two gene expression clustering algorithms using R.Select the best algorithm and construct a third improved algorithm.

  Create unix shell scripts using dos commands

Suppose you are an experienced DOS programmer and you wish to create UNIX shell scripts using DOS commands.

  Show that there exists an election algorithm for hypercubes

Show that there exists an 0 (N log N) election algorithm for hypercubes without a sense of direction. Show that there exists an O(N(log N +k)) election algorithm for networks with bounded degree k

  Evaluate the given problem of data types

Comprehensive quiz 1) Evaluate the following: a) (5 > 3 && 4 6 && true) c) (3 >= 3 || false) d) (true || false) ? 4 : 5.

  What is highest number of messages sent by correct processes

What is the highest number of messages sent by correct processes in Algorithm 15.4 in executions that decide on O? Answer both for the case where the general is correct and the case where the general is faulty.

  Write an algorithm that traverses a tree

Write an algorithm that traverses a tree and prints all of its words in lexical order.

  Design a linked list structure

Design a linked list structure Music that contains data fields Name, Artist, Number_of_Songs, and a pointer to the list. Design the structure with three members and fill in data for each member.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd