Keep track of the total number of bugs collected

Assignment Help Business Economics
Reference no: EM131399399

Insert a Comment box, and type comment lines for the Author, Date, and Description.

Declare variables for the daily number of bugs, an accumulator variable to keep track of the total number of bugs collected, and a loop counter (suggestion: name this variable counter) to count the number of loop iterations. These can all be Integer variables.

Assign an initial value of 0 to your accumulator variable, and an initial value of 1 to your counter variable.

Create a While loop that iterates when counter <= 7.

Inside the loop, prompt the user for the number of bugs collected that day. Use the counter as the day number in the prompt, like, "Enter the number of bugs collected for day " & counter. Store the input value in the variable for the daily number of bugs. Next, add that value to the accumulator variable. Finally, add 1 to the counter.

When your loop exits, display the total number of bugs collected, with text. A sample output line might look like this: Total number of bugs collected: 239

Save your file as S05.fprg.

Reference no: EM131399399

Questions Cloud

Find the value of the mean point difference : Find the value of the mean point difference and the value of the median point difference for the 11 games.- Explain which of the two summary values found in part (a) is a better summary of the team's season.
Enter an integer for the base of the power : This assignment requires one file containing a main function and a recursive function named power.
Firm system development mission statement : 1. Would you continue to work for a company if you disagreed with the firm's system development mission statement? Why or Why not?
Discuss the article -the containerization of commodities : Provide a 1100 word written paper choosing ONE of the three topic choices given below:(1) Compare two examples of intermodal container and freight technology.(2) Discuss how new container tracking devices will improve international intermodal transpo..
Keep track of the total number of bugs collected : Declare variables for the daily number of bugs, an accumulator variable to keep track of the total number of bugs collected, and a loop counter (suggestion: name this variable counter) to count the number of loop iterations. These can all be Integ..
Find the surface area of that portion of the larger sphere : As shown in FIGURE 9.R.4, a sphere of radius 1 has its center on the surface of a sphere of radius a > 1. Find the surface area of that portion of the larger sphere cut out by the smaller sphere.
Okeanos explorer in training program : A brief letter of interest (limited to one single-spaced page), which specifically addresses these questions:A.   Why do you think ocean exploration is important? What are your anticipated educational / academic goals for this Mapping Explorer-in-tra..
Provide a summary of the dataset based on your histogram : Create a histogram for the number of words in the 600 randomly selected sentences.- Provide a summary of the dataset based on your histogram.
What do you think are the possible major tensions : What do you think are the possible major tensions that exist when a pharmaceutical firm forms an alliance with a biotechnology firm? How would you try to address those tensions?

Reviews

Write a Review

Business Economics Questions & Answers

  A few years ago a construction manager earning

A few years ago a construction manager earning $70,000 every year working for a regional home builder decided to open his own home building company.

  The relationship between inflation and unemployment

The relationship between inflation and unemployment is given by

  When firms are deciding on the size of stock

DeAngelo Corp.'s projected net income is $150.0 million, its target capital structure is 25% debt and 75% equity, and its target payout ratio is 65%. DeAngelo has more positive NPV projects than it can finance without issuing new stock.

  An individual deposits an annual bonus into savings account

An individual deposits an annual bonus into a savings account that pays 6% interest compounded annually. The size of the bonus increases by $5,000 each year, and the initial bonus amount was $20,000. Determine how much will be in the account immediat..

  Which relational principle is negatively affecting

Latoya and Martha are friends who live across town. Latoya always seems to be the person to initiate communication. When Latoya decided to let Martha contact her, the phone call never came. Which relational principle is negatively affecting Latoya an..

  Calculate mrts and determine slope of the isoquant

Consider the production function q=4L^.3K^.8. K is not fixed in the long run. Graph the isoquant for Q=4. Identify and label 3 points on the graph. Calculate MRTS and determine slope of the isoquant of the three points you identified. label the slope..

  List four shift factors of demand and their effect on demand

List four shift factors of demand and their effect on demand. Shifts in demand for the good. An increase in the demand for a good shifts the demand for labor to the right. The elasticity of demand. The more elastic the demand, the more the demand cur..

  Explain why do changes in bank reserves resulting

Explain why do changes in bank reserves resulting from open-market operations by the fed produce multiple changes in checkable deposits in the economy.

  Illustrate what is the bond''s current market price

Presently the bond is priced to yield a return of 5% per year. Illustrate what is the bond's current market price.

  Nominal exchange rate of us dollar depreciates

What is happening to the US trade balance in each of the following situations? Explain. a. Lower international trade barriers for imported products in the US b. Prices in the US decreases more than prices abroad c. Economic improvement starts in Cana..

  Measures globalization on economic-political dimensions

The KOF Index of Globalization, provided by the KOF Swiss Economic Institute, measures globalization on economic, social, and political dimensions. Provide a brief analysis (not a description) of this index and its ranking using concepts from the tex..

  Change in price causes a change in quantity demanded

When demand is elastic, the____________effect dominates the_________effect. When demand is inelastic, the___________effect dominates the_____________effect. When a change in price causes a change in quantity demanded, total revenue always moves in th..

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