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
Anit [1.1K]
3 years ago
9

Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the pop

ulation of the United States is 312 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two countries every year until the population of Mexico excceds that of the United States, and display the number of years it took. Save file as Population.java.***NOTE**** This is my first class of java the program that I have to write has to be of what we have learned in the last 6 chapters it cannot have stuff that is way more advanced than the first 6 chapters.
Computers and Technology
1 answer:
AfilCa [17]3 years ago
6 0

Answer:

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables

   double mexico = 114;

   double usa = 312;

   double mexicoRate = .0101;

   double usaRate = .0015;

// calculate population after every year until mexico population exceed the usa populationn

   while (usa>mexico)

   {

// print the population

       cout<<"Mexico's population ::"<<mexico<<" million."<<endl;

       cout<<"USA's population ::"<<usa<<" million."<<endl;

// update the population

       mexico+=mexico*mexicoRate;

       usa-=usa*usaRate;

   }

return 0;

}

Explanation:

Declare and initialize mexico and usa with their initial population.Also declare and initial their increase and decrease rate.Find the population of both the  country each year until mexico population exceeds the usa population.

Output:

Mexico's population ::114 million.                                                                                          

USA's population ::312 million.                                                                                            

Mexico's population ::115.151 million.                                                                                      

USA's population ::311.532 million.

.

.

.

Mexico's population ::270.546million.                                                                                      

USA's population ::274.213 million.                                                                                        

Mexico's population ::273.278million.                                                                                      

USA's population ::273.802 million.

You might be interested in
A user logs into Active Directory on a workstation and the user home directory does not redirect to a network share on a file se
inysia [295]

Answer:

gpresult

Explanation:

Group Policy provides the system administrator with settings that would be necessary to manage the different user accounts available in an organization. It also controls their work environment centrally by configuring the user Operating System (OS), applications and user accounts.

Group policy settings or configurations are referred to as Group Policy Objects (GPOs). These objects can be linked to organizational units (OUs), domains or sites.

There are various group policy commands such as;

  1. rstrui (System Restore tool will run),
  2. runas (using different permission to run a tool or program),
  3. tasklist (currently running programs are shown
  4. gpupdate (Group policies are refreshed)
  5. gpresult (group policy configurations are displayed for verification)

gpresult command can be used to verify the group policy configurations for adjustment or optimization. The technician can start troubleshooting from viewing the active settings, then running the rstrui to start the System Restore utility to restore the computer to an earlier date

6 0
3 years ago
A.
FrozenT [24]

Answer:

b. the action is not allowed.

Explanation:

Traffic signs are established rules and regulations designed to direct and guide commuters and other road users.

A red circle and diagonal slash on a sign simply means that the action is not allowed.

A hortatory technique is focused on encouraging, exhorting and urging people to do that which is right, acceptable and worthy of emulation by others.

For example, commuters and road users are being urged not to litter the highway with thrash, waste, or dirt, in order to protect the planet from environmental degradation and pollution. This would help in conserving and mitigating risks posing as a threat to our dear planet and habitat.

Hence, a hortatory technique in policy implementation and enactment is primarily aimed at appealing to the sense and conscience of individuals, to engage in socially responsible acts.

7 0
3 years ago
Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raise
Bezzdna [24]

Answer:

The statement in python is as follows:

to_the_power_of(cube_side,3)

Explanation:

As stated as the requirement of the code segment, the statement takes as parameters a variable cube_side and a constant 3.

It then returns the volume of the cube; i.e. cube raise to power 3

<em></em>

<em>See full program below</em>

<em>def to_the_power_of(val,powe):</em>

<em>     result = val**powe</em>

<em>     print(result)</em>

<em>cube_side = float(input("Cube side: "))</em>

<em>to_the_power_of(cube_side,3)</em>

4 0
3 years ago
How do we add questions on sam Blockly?​
Blizzard [7]

Answer:

I do not know that answer

5 0
3 years ago
What was the purpose of the Internet Architecture Board?
Nata [24]

Answer:

c to help build the internets infrastrucuter

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Select three examples of cryptographs. Security tokens Shared-key Malware Firewalls Message authentication code Public-key
    7·2 answers
  • Can you help me correct a sentence?
    13·1 answer
  • Which statement prints "hi" on the screen?
    5·2 answers
  • . (a) Prove or disprove carefully and in detail: (i) Θ is transitive and (ii) ω is transitive. (b) Assume n is a positive intege
    15·1 answer
  • Students are studying the effects of beach pollution by counting populations of seagulls at two different beach locations. One l
    7·1 answer
  • Mary is writing an article about the software development life cycle. She wants to place a flowchart besides the text. Which men
    6·2 answers
  • What is output when the CarTest application is run? Why?
    11·1 answer
  • You do not really know that you have a hand. Here is why. Imagine the possibility in which you are only a handless brain floatin
    14·1 answer
  • Direction: Read each item carefully and choose the letter of the correct answer. Write your answers on a separate sheet of paper
    12·1 answer
  • Select the correct answer.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!