Program that prompts the user to enter the birth rate

Assignment Help Programming Languages
Reference no: EM13948045

f P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula:

P + (B * P)/100 - (D * P)/100

The population growth rate is given by the formula:

B - D

Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number f years. The program should then calculate and print the estimated population after n years. Your program must consist of the following functions:

a. growthRate: This function takes as its parameters the birth and death rate, and it returns the population growth rate.

b. estimatedPopuation: This function takes as its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years.

Your program should to accept a negative birth rate, negative death rate, or a population less than 2.

1539_Program_6B.jpg

Reference no: EM13948045

Questions Cloud

Calculate the mean and the standard deviation : When the machine is functioning correctly the company expects a mean of 10.00 mm and a standard deviation of 0.05 mm. The machine is overhauled when the variability (i.e. the SD) deviates from the norm by 50% or more. What do your results suggest ..
Stock market bubbles will impact consumers by encouraging : An economy at the top of a stock market bubbles will impact consumers by encouraging A. greater consumption of luxury goods and less saving. B. more work and delaying retirement. C. greater consumption of luxury goods and greater saving. D. more inve..
Describe the phenomenon of passivity : Briefly describe the phenomenon of passivity. Name two common types of alloy that passivate. Why does chromium in stainless steels make them more corrosion resistant in many en- vironments than plain carbon steels?
Business reported the changes in working capital : A house painting business had revenues of $17,600 and expenses of $10,600 last summer. There were no depreciation expenses. However, the business reported the following changes in working capital:
Program that prompts the user to enter the birth rate : This function takes as its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years.
What is the equivalent annual savings from the purchase : Gluon Inc. is considering the purchase of a new high pressure glueball. It can purchase the glueball for $110,000 and sell its old low-pressure glueball, which is fully depreciated, for $20,000. What is the equivalent annual savings from the purchase..
Explain why or why not if the statement is incorrect : Explain why or why not. If the statement is incorrect, how would you state it correctly?
Research on the theories of relationships and intimacy : This week you have read research on the theories of relationships, intimacy, love, social identity, self categorization, and social comparison. Now you will have a chance to showcase what you have learned by creating a recommendation based on this..
How does the portfolio fair compare to the s&p 500 : Your client has $50,000 to invest and you plan to invest 60% in the security with the highest expected return. What would be the characteristics of this portfolio be (E(R),S)?

Reviews

Write a Review

Programming Languages Questions & Answers

  Track of position of a point in three-dimensional space

Specify, implement and design a class that can be used to keep track of position of a point in three-dimensional space. For example consider the point drawn at the topof the next coloumn. The point shown there has three coordinates

  Write shell script to read from keyboard-display on monitor

Write shell script called poject.21 to read from keyboard and display on monitor first name, last name and age if the age is less than 50.

  Write script in unix to monitor creation of pdf in directory

Write script in unix which monitors creation of .pdf or PDF file in current directory. Every minute it must display list of these filenames created after previous display a list.

  Write down a program to request the user to input a numeric

write a program to request the user to input a numeric value. if the input is even the program will display all the

  Recursive method to read in string of characters

Trying to write a recursive method that reads in a string of characters and checks to see if the first character is either a 'D' or and 'E', then is followed by a string of one or more 'F's.

  Front end applications

How does a compiled binary executable store on the client computer?

  Write pseudo algorithm which inputs age for valid voting

Write pseudo algorithm which inputs Age, displays "Yes, you can vote" if Age is 18 or older and displays "You are too young to vote" if Age is less than 18, and displays nothing else.

  Discuss the merits and weaknesses of interpreting,compiling

Interpreted code executes much more slowly than compiled code, yet several systems use them extensively. The most well known are Visual Basic (it has two modes: interpreter mode and compiler mode), JavaScript and the special case of interpretation..

  Write a program that takes one command-line argument

Write a program called runsim that takes one command-line argument. Check for the appropriate command-line argument and output a usage message if the command line is incorrect.

  Javascript for metric conversions

Write a javascript that will assist the user with metric conversions. Your program should allow the user to specify the names of the units as strings.

  Write program compute salary by adding base tax

Compute by adding base tax for that salary range and product of percentage of excess and amount of salary over minimum salary for that range. Write a program which solves this problem.

  Cryptography problem - caesar cipher

Write a class CaesarCipher that gets constructed on the value shift_by. Its encode method encodes a string by shifting letters by shift_by positions, and its decode method decodes an encoded string.

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