Determine the length of bursts of zero

Assignment Help Business Management
Reference no: EM132178023

Write a program to determine the length of bursts of zero's in a list of N numbers stored in an List. The program should record the length of the bursts of zero's in another List. The program should then print the lengths of the bursts.

Using this second List with the lengths of the bursts, it should also compute and print the following: the average length of the bursts, the minimum burst length, the maximum burst length, and the total number of zeros (the sum of the burst lengths). 

Your program should:

1. Prompt the user for the size of the list (N). Then it should prompt the user to enter N numbers and store them into an list called burstList. Note, you should specify the maximum size of N allowed (based on how large you declare your List).

2. Given N and list, your program should compute the lengths of the bursts of zeros and store them in an list called BurstLengths. After computing and storing the burst lengths you should terminate your BurstLengths list with a sentinel (-1). Use a for loop in this step.

3. Given the BurstLengths List with a sentinel (-1), use a while loop to print the list of burst lengths. Format this nicely in a table with headings.

4. Given the BurstLengths List with a sentinel (-1), compute and then print the following information:

a. Average burst length

b. Minimum burst length

c. Maximum burst length

d. Total number of zeros

Reference no: EM132178023

Questions Cloud

Were there any unintended consequences of the law : If laws were passed was the goal they intended to achieve reached? If yes explain how, if not explain why not.
Should economists discard the heckscher-ohlin theorem : Should economists discard the Heckscher-Ohlin theorem as a practical explanation of trade patterns and search for other theories of trade?
Focusing on host intrusion detection system : Focusing on Host Intrusion Detection System, Intrusion Prevention Systems (HIDS) or AntiVirus Systems.
Discuss the pricing decisions of generic drug manufacturers : Using the New York Times article, "Defiant, Generic Drug Maker Continues to Raise Prices," conduct further research on the pricing strategies of generic drug.
Determine the length of bursts of zero : Write a program to determine the length of bursts of zero's in a list of N numbers stored in an List.
What was occurring in that region of the world : When & where was the document written? What was occurring in that region of the world when the document was produced?
Find the angular velocity after 2 seconds : Draw a neat diagram of the rectangular sheet of metal and show the dimensions given including the squares of side x - Find the value of x such that the volume
How to allocate output between two markets : A monopolist is deciding how to allocate output between two markets that are separated geographically. Demands for the two markets are p1 = 15 - Q1 and p2 = 25.
Explain the reasons behind the shift : Think about a good or service for which you believe there has been a shift in demand or supply. Explain the reasons behind the shift and how that has influenced

Reviews

Write a Review

Business Management Questions & Answers

  Organization founders-leaders and history

At least 5 pages, APA formatHow culture emerges in an organization and how it links to organization's founders, leaders, and history.The significance of reasoning for organizational culture change.

  Deeper understanding to ethics

Ethic values are essential to most courses taught in college. It is no less important for accounting. Ethics is such a broad term and I think in this class

  Tender is an unconditional offer to perform

Courts may imply conditions from the purpose of a contract or from the intent of the parties. Tender is an unconditional offer to perform.

  How are the respective companies and industries unique

What is your assessment of each firm's future competitive sustainability based on this analysis? Provide a rationale for your thinking.

  Record with the two tables you implemented

Extend your PHP application to read and compose a record with the two tables you implemented in MySQL, and dynamically display the results.

  Shareholder of a corporation

Question 1: Generally, a shareholder of a corporation

  Define what is meant by a strategic dilemma

In your answer define what is meant by a 'strategic dilemma', and the basic characteristics of each model. Use examples to illustrate your answer.

  Incentive programs for non-physcian staff

Proposal to provide non-physician staff with a money-based incentive program was rejected as being too costly and what other types of recognition and reward programs can you recommend?

  Systems approach to training and development

The systems approach to training and development suggests that there should be at least four or five specific steps in the process. These include:

  Harden the internet explorer browser

What are the steps you need to take to harden the Internet Explorer browser? IIS?

  Director for a large contract security organization

You have been appointed training director for a large contract security organization and are restructuring the training program for security officers. Assuming you have an unlimited training budget, address issues related to topics and methods of ..

  Incident response procedure

What sort of considerations might be found in an incident response procedure? (WHS)

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