1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marina86 [1]
3 years ago
13

The population of town A is less than the population of town B. However, the population of town A is growing faster than the pop

ulation of town B. Write a program that prompts the user to enter: The population of town A The population of town B The growth rate of town A The growth rate of town B The program outputs: After how many years the population of town A will be greater than or equal to the population of town B The populations of both the towns at that time. (A sample input is: Population of town A = 5,000, growth rate of town A = 4%, population of town B = 8,000, and growth rate of town B = 2%.)
Computers and Technology
1 answer:
defon3 years ago
3 0

Answer:

#include<iostream>

using namespace std;

void main()

{

int townA_pop,townB_pop,count_years=1;

double rateA,rateB;

cout<<"please enter the population of town A"<<endl;

cin>>townA_pop;

cout<<"please enter the population of town B"<<endl;

cin>>townB_pop;

cout<<"please enter the grothw rate of town A"<<endl;

cin>>rateA;

cout<<"please enter the grothw rate of town B"<<endl;

cin>>rateB;

while(townA_pop < townB_pop)//IF town A pop is equal or greater than town B it will break

{

townA_pop = townA_pop +( townA_pop * (rateA /100) );

townB_pop = townB_pop +( townB_pop * (rateB /100) );

count_years++;

}

cout<<"after "<<count_years<<" of years the pop of town A will be graeter than or equal To the pop of town B"<<endl;

}

Explanation:

You might be interested in
The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan
antoniya [11.8K]

Answer:

The answer is letter A. TRUE

Explanation:

The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan area, often in locations such as church basements, YMCAs, and coffeehouses, is commonly known as off-off-Broadway.  This statement is true.

3 0
3 years ago
Which design element involves the act of lining up objects vertically or horizontally to give a sense of order?
Nadya [2.5K]

Answer:

HHJJTFCS

Explanation:

8 0
2 years ago
What is a programming method that provides for interactive modules to a website?
Veseljchak [2.6K]

Answer:

Java?

Explanation:

8 0
3 years ago
Employees are one of the main contributors to cybersecurity breaches because of _____? Select 3 options.
Tema [17]

Answer: inattention, lack of knowledge, and negligence.

Explanation: employees are often the cause of workplace incidents because they may be unknowledgeable about security protocols, negligent, or simply make a mistake.

5 0
2 years ago
Name and describe each of the five parts of a standard wind tunnel.
Serjik [45]
Fan
drive motor
diffuser
contraction section
test section
3 0
2 years ago
Read 2 more answers
Other questions:
  • A device (or a software program on a computer) that can monitor data traveling on a network is known as a socket sniffer. ______
    15·1 answer
  • In a system using the fixed partitions memory allocation scheme, given the following situation (and using a decimal form): After
    9·1 answer
  • PLEASE HELP
    15·2 answers
  • Use unit analysis to determine the unit of measurement for the expression 10x + 25y​
    8·1 answer
  • What happens when two computers have the same IP address?
    13·1 answer
  • Your friend's job pays $5.00 per hour, and he works 20 hours per week. His tax rate is 20 percent. Assuming he works 50 weeks of
    11·2 answers
  • Is there any difference beetween the old version of spyro released on the origional and the newer ones??? or is it only change i
    8·1 answer
  • ❤️❤️Please answer the six questions ✨BRAINIEST✨ For correct answer ❤️❤️
    7·1 answer
  • Define the term visual as used in visual programming
    9·1 answer
  • A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!