Question
You must use a loop structure to receive credit for this assignment. The population of town A is less than the population of town B.
You must use a loop structure to receive credit for this assignment. The population of town A is less than the population of town B. However, the population of town A is growing faster than the population of town B. Design an algorithm and write a C++ program that prompts the user to enter the population and growth rate of each town. The program outputs after how many years the population of town A will be greater than or equal to the population of town B and the populations of both the towns at that time. Hint: use static_cast( ) when calculating the new population every year
**************** * Population * Enter the current population of town A: 5000 Enter the current population of town B: 8000 Enter the growth rate percent of town A: 4.5 Enter the growth rate percent of town B: 2.7 After 28 year(s) the population of town A will be greater than or equal to the population of town B. After 28 population of town A is 17126 After 28 population of town B is 16847Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started