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

  Write advantage of linked list implementation of stack

The tree's item type is int. Function must return number of leaves in tree. Determine the advantage of linked list implementation of stack versus array implementation?

  Create the logic for a program that continuously prompts

Pass each entered amount to a conversion method that displays breakdown of the passed amount into the fewest bills; in other words, the method calculates the number of 20s, 10s, 5s, and 1s needed.

  Write an algorithm that computes the depth-first search

Write an algorithm that computes the depth-first search in­ terval labeling scheme (see Subsection 4.4. 2) for an arbitrary connected net­ work. Can it be done in O(N) time units? Can it be done using O(N) messages?

  Discuss how concurrency control mechanism interacts

Describe, with examples, the types of problem that can occur in a multi-user environment when concurrent access to the database is allowed. Give full details of a mechanism for concurrency control that can be used to ensure that the types of probl..

  Let g = (v,e) be a weighted graph & t be spanning tree

Given a bipartite graph G = (V,E) and a matching M is a set of E, it is possible to determine if M is a maximum matching in G in worst case O(E+V) time.

  What is procedural or algorithmic programming

What is procedural or algorithmic programming? What is object-oriented programming? What is the role of code reuse in object-oriented programming

  Describe why algorithm runs in linear time-adjacency matrix

Rreached from every other vertex. Describe why your algorithm runs in linear time (O(V2) on an adjacency matrix; O(E+V) on an adjacency list).

  How to calculate signature using mod

How does he calculate the signature on each of m1j mod n (for positive integer j), m1-1 mod n, m1*m2 mod n, and in general m1j*m2k mod n (for arbitrary integers j and k)?

  Data and process modeling

The next phase in the project development cycle is to develop a logical model of the system based on the system requirements. The first step is about the "what" step. We need to show what the system will do, without worrying about how it will do..

  Write forensic analysis for the windows 7 os

Download one of the forensic tools at http://forensiccontrol.com/fcresources.php, run it on Windows 7 OS, make up exercises that will test its capabilities and evaluate it. Write a one-page report on its potential use in forensic analysis for the ..

  Draft a mission statement for willowbrook school

Draft a mission statement for Willowbrook School, based on information provided in the first two chapters and does a strong business case exist in the case of Willowbrook School? Discuss why or why not.

  Currency conversion development

Currency Conversion Development

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