Calculate population increase

Assignment Help Basic Computer Science
Reference no: EM13219822

This Program will Generate a table showing the projected population growth over the next 10 years. Inputs: Allow the user to enter in 2 numbers that represent the current population, and a growth rate. Output: Your program should output two things: 1. A table of the projected population for the next ten years 2.A projection of how many years it will take for a population to get to 1 million people. Tips: You will need 2 different loops to do this program The first loop you can use to print out 10 years of data. So use FOR loop that runs 10 times, and each time through the loop increase the population by the rate entered. Inside the loop print out a year and the current population. The second loop will need to calculate population increase until (so do a do/ until, or a do/ while loop) the population gets to 1 million (or more) and count how many times the loop ran. The output then would be that count. You will want to use 2 variables, one for the index of the for loop ( and the counter in the do loop) and the other variable to keep track of your "current" population.

Reference no: EM13219822

Questions Cloud

Define what is the solubility of mns : What is the solubility of MnS, in grams per liter, in a buffer solution that is 0.115M HC2H3O2 - 0.500M NaC2H3O2 ? For MnS, Kspa=3x10^7
Write the recursive function c++ : write main program that uses the sumbits function to compute the number of bits in the unsigned long integer, and illustrates the work of the show bits function.
How the company might respond strategically : Identify a foreign market that you feel this company should enter next, and explain why it should enter that market and which of the strategies should be used and explain the challenges from competition in the local market, and how the company might ..
What is the new balance sheet for the federal reserve banks : The Federal Reserve Banks sell $3 billion in securites to members of the public, who pay for the bonds with checks. Show the new balance sheet for commercial banks if reserves = 33, securites = 60, checkable deposits = 150, and reserve banks = 3.
Calculate population increase : The output then would be that count. You will want to use 2 variables, one for the index of the for loop ( and the counter in the do loop) and the other variable to keep track of your "current" population.
Synthesise theories and models from the module readings : Synthesise theories and models from the module readings and literature and utilise effective discussion, analysis and conclusions showing critical thinking to propose solutions
What will be the effect of an increase of 10dollar per unit : Suppose that a perfectly competitive consant cost industry if initially in short and long-run equilibrium. In general, what will be the effect of an increase of $10 per uni in varialbe coss on he short-run equilibrium price, the short-run industry..
How much total profit is the firm earning at the price : Suppose a monopolist charges a price of $27 for its product and sells 10 units at that price. At 10 units of production the firm has average fixed cost equal to $10 and average variable cost equal to $12. How much total profit is the firm earning ..
Use double variable to represent the private data of class : Use double variable to represent the private data of the class. Provide a constructor that enables an object of this class to be initialized when it is declared.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Finding content of ac and memory word at specified address

What are the content of the AC and the memory word at address 103 when the computer halts.

  Explain the difference between data, information

Explain the difference between data, information, and Business Intelligence and give specific examples.

  Explaining ethical issues related to it

Ethics is "a set of principles of right conduct". Main ethical issues related to IT are accuracy, privacy,  property (including intellectual property), and accessibility to information.

  Find out the average cpi for the two executables compiled

Consider a program compiled using compilers A and B running on the same processor. Find out the average CPI for the two executables compiled by compilers A and B given that the processor has a clock cycle time of 1ns.

  Describe potential challenge for collaboration-it department

Author recommends ways to do this. Describe potential challenge that this type of collaboration might face and explain way of dealing with it.

  Method named printgrid

Write a method named printGrid that accepts two integer parameters rows and cols. The output is a comma-separated grid of numbers where the first parameter (rows) represents the number of rows of the grid and the second parameter (cols) represents th..

  Write a program that conducts a dialog

Write a program that conducts a dialog with the user as follows: i. Ask the user what is his/her first name. ii. Ask the user what is his/her last name. iii. And then respond by saying What is your first name?John WHat is your last name?Smith Hell..

  How procedure calls go before registers saved in memory

How deep can the procedure calls go before registers must be saved in memory? (That is, what is the maximum number of "active'' procedure calls that can be made before we need to save any registers in memory?)

  Encourage cooperation consistent with standards

Encourage cooperation from all, make it suitable to clean up, be consistent with standards - Who will put it away? Explain where will it be put away? When will it be put away?

  Accepts filename to sort and run

Accepts filename to sort and run size as command line arguments. Calls the sort routine. Writes the sorted result to a file named sorted.txt.

  Describe significance of having test coupled with real users

Describe the significance of having test coupled with real users' views of product at the end of development effort,even if it is test of a prototype and not the completely developed software.

  Understanding of storage classes and scope rules

It amounts to a "divide and conquer" approach to problem solving. This needs sound understanding of storage classes and scope rules. Response and or thoughts?

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