Branching are key to most software algorithms

Assignment Help Data Structure & Algorithms
Reference no: EM13753222

Description:Decisions and branching are key to most software algorithms. For this problem we will be working with prime numbers. Note that 0 IS NOT to be considered prime, but 1 is a prime. The definition of a prime number is that there are NO OTHER ways to produce the number by multiplying any other numbers EXCEPT 1 and the number in question.

In this machine problem you will be using loops and decision making to find the prime numbers from 0 to 200. You will count from 0 to 200, and for EVERY NUMBER you will:

1. Determine if the number is a prime. If it is, print out the number and indicate it is a prime number,

2. Indicate if it is 0, or

3. Tell what factor prevented the number from being prime, if the number is NOT prime.

Each number, and its' result will occupy its own line of output. Make sure that the output is easy to read.

Questions:

No questions this machine problem.

Deliverables:

1. Source code for the program with proper comments, variable names, and white space

2. Flowchart for your code

3. A copy of the output

4. Discussion of the problem, including

a. What the program was meant to accomplish

b. Problems involved, and how you overcame those problems

c. What data you used to test your program and how effective that test was at finding errors

Reference no: EM13753222

Questions Cloud

Does us foreign policy more harm than good in international : Critically analyze this perception by asking: Does American foreign policy do more harm than good in international relations?
Disadvantages of a call provision : What are the advantages and disadvantages of a call provision from the viewpoints of both a firm and its bondholders? If you were the CEO of a firm, would you recommend a call provision for a new bond issue? Why or why not? Can you identify a r..
Forecasting checking account balances : If an organization does not want to overdraft, then it should look at the _________ cash balance when forecasting checking account balances.
Electronic medical records and electronic health records : Electronic medical records and Electronic health records
Branching are key to most software algorithms : Decisions and branching are key to most software algorithms. For this problem we will be working with prime numbers. Note that 0 IS NOT to be considered prime, but 1 is a prime.
How hitech are improving patient and community health : How electonic health records and health technology (HITECH) are improving patient and community health
Describes the culture of zappos : Of the four types of corporate culture, which most closely describes the culture of Zappos? What are the implications for the organization and for managers and employees? Is this a company you could work for? In terms of corporate culture, why or ..
Write a summery of the project the middle ages in europe : Write a summery of the project The Middle Ages in Europe.
Effects of business events on the accounting : Accounting conventions represent the principles, assumptions, and rules that guide an accountant as he or she analyzes the effects of business events on the accounting cycle and applies them to various cycle procedures. Part 3 of the assessment re..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Draw the recursive process of quicksort

Draw the recursive process of Quicksort and Mergesort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Quicksort and Mergesort respectively. What are their depths?

  Use of primitives helps remove ambiguities in algorithm

Explain the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm. Describe how the use of primitives helps remove ambiguities in an algorithm's representation.

  Count up the number of times that both arrays

Count up the number of times that both arrays have the same integer value at the same index.

  Generates all the possible n-node binary tree

Implement a function that generates all the possible N-node binary tree configurations. The value N is a parameter to the function and the function should return a list of binary tree. Any container ADT (list, queue, vector, etc...) will be used t..

  Question about character array

The 2-most important design issues that are specific to character string types are the given, Should strings be simply a special kind of character array or a primitive type?

  Evaluate each of the following statements

If x = 5, y = 6, z = 4, and w = 3.5, evaluate each of the following statements, if possible. If it is not possible, state the reason.

  Define how to building a binary search tree

Three of these operations (all but add) must visit every node in the tree. One of these must use preorder traversal, one must use inorder traversal, and one must use postorder traversal.

  Maekawa''s algorithm

Maekawa's Algorithm is used to achieve mutual exclusion for 13 sites. Suppose the sites are labeled 1, 2, ..., 13. Find the request sets R1, R2, ... , R13. Suppose sites 1, 6, 12 want to enter a critical section ( CS ) and they have sent requests in ..

  Demonstrate a decision tree or table

Demonstrate a decision tree or table

  Queue and content of countdown timer-using priority queue

At time 230 five processes (P1 - P5) are waiting for timeout signal. They are scheduled to wake up at times: 260, 320, 360, 430, 450. Using priority queue with time differences illustrate queue and content of countdown timer at time 230.

  Define a federated database

Define a federated database and discuss why are federated databases becoming increasingly common? Provide examples of databases in your current or previous work environment

  Creating a data flow chart

Create a Data Flow Chart and then make an application that allows a user to enter a stock transaction and determine the stockbroker's commission.

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