Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

You can write c++ by your handwriting Part 1 140 Pointsl The population of town A is less than the population of town B. However,

You can write c++ by your handwriting image text in transcribed
Part 1 140 Pointsl 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 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. (A sample input is: Population of town A 5 5,000, growth rate of town A 5 4%, population of town B 5 8,000, and growth rate of town B 52%.) Sample Output: Enter the current population of town A: 5000 nter the current population of town B 8000 Enter the growth rate of town A: 4 Enter the growth rate of town B: 2 be greater than or equal to the population of town B Atter 2s yearc9) the populaton of town After 25 population of town A is 13308 fter 25 population of town B is 13110 Process returned o COxO) execution time 11.614 s Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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