answer.
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]
2 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:
defon2 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
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
natali 33 [55]
2 I think because 2 I think is binary I’m sorry if this is wrong
8 0
1 year ago
Ishmael would like to capture a selected portion of his screen and then capture actions he preforms on that selected portion. Wh
kompoz [17]

Answer:

Use the Insert Screen .

Explanation:

Remember, on most computer keyboard you'll find a button named "Insert Screen' which functions as a screenshot too. Also, note that if Ishmael is using Windows operating system he should simply do the following;

1. open the window you want to screenshot

2. click the Screenshot button

But to select a part of the screen he would need to use Screen Clipping which would allow him select the part of the window that he wants. ( It screen will look opaque)

3. the pointer would change to a cross, then he should press and hold the left mouse button and drag to select the part of the screen that he wants to capture.

5 0
1 year ago
Marcia Wilson owns and operates Marcia’s Dry Cleaning, which is an upscale dry cleaner in a well-to-do suburban neighborhood. Ma
ryzh [129]

Answer:

Marcia Wilson owns and operates Marcia’s Dry Cleaning, which is an upscale dry cleaner in a well-to-do suburban neighborhood. Marcia makes her business stand out from the competition by providing superior customer service. She wants to keep track of each of her customers and their orders. Ultimately, she wants to notify them that their clothes are ready via e-mail. Suppose that you have designed a database for Marcia’s Dry Cleaning that has the following tables:

Assume that all relationships have been defined, as implied by the foreign keys in this table list, and that the appropriate referential integrity constraints are in place.

Create a dependency graph that shows dependencies among these tables. Explain how you need to extend this graph for views and other database constructs such as triggers and stored procedures.

Assume you want to change the name of the INVOICE table to CUST_INVOICE. Use the following steps to change the table name:

(1) Create a new table with the new name.

(2) Alter any constraints, triggers, or views that may be affected.

(3) Copy all data from the old table to the new table.

(4) Create any needed foreign key constraints

(5) Drop the old table.

Explanation:

4 0
2 years ago
Describe how computers are used to access, retrieve, organize, process, maintain, interpret, and evaluate data and information.
Sonja [21]

Information refers to the meaningful output obtained after processing the data. Data processing therefore refers to the process of transforming raw data into meaningful output i.e. information.Mechanically using simple devices like typewriters or electronically using modern data processing tools such as computers.

8 0
1 year ago
Enter a nested function in cell G8 that displays the word Flag if the Payment Type is Credit and the Amount is greater than or e
stira [4]

Answer:

IF(AND(Payment_Type = 'Credit', Amount >= 4000),'Flag')

Explanation:

Given

Search criterion 1: Payment Type: Credit

Search Criterion 2: Amount ≥

$4000

Given the above search criteria, the nested function is as follows;

IF(AND(Payment_Type = 'Credit', Amount >= 4000),'Flag')

The above statement will display the word 'Flag' without the quotes if and only if the two conditions in the brackets are satisfied

Condition 1: Payment_Type = 'Credit'

Here, Payment_Type is used because when naming a column, it's preferred to avoid space or blank characters.

So, if this condition is satisfied (i.e. if payment type is credit) it checks for condition 2

Condition 2: Amount>=4000

This mean the amount must be at least 4000.

Both conditions must be satisfied because of the AND clause in the statement.

8 0
2 years ago
Other questions:
  • U.S. industries like steel, computers, and energy need to be protected from foreign competition to ensure which of the following
    6·2 answers
  • Robin wants her presentation to move from one slide to another with special motion effects. Which option should Robin use?
    15·2 answers
  • A ____ partition contains the data necessary to restore a hard drive back to its state at the time the computer was purchased an
    8·2 answers
  • Does the Boolean expression count &gt; 0 and total / count &gt; 0 contain a potential error? If so, what is it?
    8·1 answer
  • Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
    7·1 answer
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • IANA has primarily been responsible with assigning address blocks to five regional internet registries (RIR). A tech needs to re
    6·1 answer
  • In the program below, what is the scope of strFirst?
    15·2 answers
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
  • 1-(50 points) The function sum_n_avgcomputes the sum and the average of three input arguments and relays its results through two
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!