Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this program, develop a CONSOLE APPLICATION that allows the user to project the population of your city for a specified number of years and

For this program, develop a CONSOLE APPLICATION that allows the user to project the population of your city for a specified number of years and growth rate. Allow the user to specify the current years population, the number of years, and the annual growth rate. Use integers for population and number of years. Enter annual growth rate as a percent. For example, 5.5% would be entered as 5.5 Use a loop to compute and display each year, starting with the current year, and the corresponding population. Keep (and round) population as an integer. Remember, next years growth includes on this years growth. Use a loop to allow the user to run the program again without exiting. Use appropriate data types and names for variables. Do not forget to add the Program/Author block at the beginning of your source code. Submit a copy of the code and the executable to Moodle. NOTES All of your code will go in the main method. The main method is in the Program class. The form of the header line is below. namespace INF143Lab4PopulationGrowth { class Program { static void Main(string[] args) { } } } Instead of Labels, you will use Console.WriteLine(text to write to screen); Instead of TextBoxes, you will use stringVariable = Console.ReadLine(); or int variable = int.Parse(Console.ReadLine()); To calculate growth: newPopulation = Math.Round(oldPopulation * (1 + growthRate / 100.0))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions