Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Having problems writing this program. The population of a town A is less than th

ID: 3631016 • Letter: H

Question

Having problems writing this program.

The population of a 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 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 grater 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 = 5000,, growth rate of town A = 4%, population of town B = 8000, and growth rate of town B = 2%.)..

I tried this three times and it killed my visual studio, any ideas.

Explanation / Answer

#include #include //my compiler does not halt when running the program unless forced to. in the spirit of not adding unnecessary values, I use Sleep instead. using std::cout; using std::cin; using std::endl; int main(){ int years = 0; double populationA, populationB, newMembersA, newMembersB, growthRateA, growthRateB; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote