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
Sophie [7]
3 years ago
7

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

ulation of the United States is 323 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 exceeds that of the United States, and display The population of Mexico will exceed the U.S. population in X years
Computers and Technology
1 answer:
horrorfan [7]3 years ago
6 0

Answer:

//Define class

public class Main {

 //define main method

 public static void main(String[] args)  

 {

   //declare and initialize the double type variable to 128

   double mexico = 128;

   //declare and initialize the double type variable to 323

   double us = 323;

   //declare and initialize the integer type variable to 0  

   int yr = 0;

   //set the while loop to check which is greater

   while (mexico < us)  

   {

     //increment in the variable by 1

     yr++;

     //initialize in the variables acc. to the percentage

     mexico *= 1.0101;

     us *= 0.9985;

   }

   //print the following results

   System.out.println("Population of the Mexico will be exceed the population U.S. in " + yr + " years");

   System.out.println("Population of the Mexico will be " + mexico + " million");

   System.out.println("and population of the U.S. will be " + us + " million");

 }

}

<u>Output</u>:

Population of the Mexico will be exceed the population U.S. in81 years

Population of the Mexico will be 288.88435953355025 million

and population of the U.S. will be 286.0198193927948 million

Explanation:

<u>Following are the description of the program</u>.

  • Firstly, we define the class 'Main' and inside it, we define the main method.
  • Then, declare two double data type variables which are 'mexico' and 'us' and initialize in it to 128 and 323.
  • Declare integer data type variable 'yr' and initialize in it to 0.
  • Set the while loop and pass the condition to check that the variable 'mexico' is less than the variable 'us' then, increment in the variable 'yr' by 1 and multiply the variables 'us' and 'mexico' by the following percentage.
  • Finally, print the following results with the message.
You might be interested in
When designing a suitable and safe flexibility training program, you should set reasonable and appropriate goals depending on wh
GalinKa [24]

Answer:

The following steps will help you design a safe and effective stretching program.

Explanation:

1. You will have to follow the ACSM's guidelines used for flexibility training.

2. evaluate your flexibility rate with the "sit-and-reach" test.

3. you have to also apply the basic principles of FITT in designing your own program.

4. have a "range-of-motion" tests performance.

5. make use of SMART guidelines when setting explicit flexibility goals.

7 0
3 years ago
Attackers will sometimes put malware on USB drives and leave them in parking lots
kherson [118]

Answer:

True

Explanation:

a lot of people use this as a way to keep things nice and safe, but sometimes thinks don’t go as planned. Don’t really know how else to answer this lol

6 0
1 year ago
all of the following are new technology-related trends in mis except: group of answer choices the mobile digital platform. iot.
Bess [88]

The option that is note a new technology-related trends in MIS is co-creation of business value.

<h3>Technology and Management Information System:</h3>

Technology and Management Information System is known to be a term that connote the way a person can know or understand data that is obtained from a lot of units and departments of an organization.

Note that It can be used in the area of integration with other types of technology and as such, The option that is note a new technology-related trends in MIS is co-creation of business value.

Learn more about  business value from

brainly.com/question/25528419

#SPJ1

5 0
2 years ago
Anyone wanna join my giggl?
Leni [432]

Answer:

whats a giggl

Explanation:

7 0
3 years ago
Read 2 more answers
Technology question.
Gnoma [55]

You should select the text by clicking and holding the mouse at the beginning of the text and then dragging it to the end of the area you want to change. You can also use the arrow keys and hold shift, but this takes longer typically.

5 0
3 years ago
Other questions:
  • Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
    9·1 answer
  • 14. What is the simplest way to permanently get rid of an unwanted file?
    9·1 answer
  • What type of file can most software applications read?
    5·2 answers
  • Which type of error is a random error
    13·2 answers
  • With respect to computer networks, organizations often install a dedicated telephone system called a ________ to route external
    8·1 answer
  • What is the Slide Sorter View used for?
    12·2 answers
  • Which of the following are correct? I. Hold the middle mouse button to rotate the model on the screen. II. To pan the model, hol
    15·1 answer
  • Explain<br> the three types of periodic<br>maintanance. .​
    10·1 answer
  • Two time series techniques that are appropriate when the data display a strong upward or downward trend are ___________ and ____
    14·1 answer
  • name instances in the past where social media has kept you informed about the latest news around the country​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!