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]
2 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]2 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
Joaquin is considering a career as an animator and wants to know more about the daily work of an average animator. Which strateg
Advocard [28]
Lacking a response to my question, I'll assume there's no "correct' answer here. 

Joaquin could contact the university's graphic arts department, or if he's interested in the programming side of it, the computer science department, and ask if they have any information on the topic. If he's already majoring to become an animator, then he should talk to one of his professors to see if they know someone in the business that would speak with Joaquin. 

The faster and better way would be to go to reddit, or some site at which animators congregate (most probably found through Google), read the forums, and create if he's not finding a suitable answer.
3 0
3 years ago
In CadStd, what does the Zoom All button do? A. Makes a drawing bigger so you can see small details B. Returns a drawing to a si
Afina-wow [57]
I belive in CadStd that the zoom all button <span>makes a drawing bigger so you can see small details</span>
3 0
2 years ago
What two things should you do before starting the design process
Charra [1.4K]

Answer: B and C

Explanation: Analyze the audience

                      Identify the problem

8 0
2 years ago
2
Elza [17]

A is the correct answer.

Hope this helps you!

3 0
3 years ago
Read 2 more answers
Picture related to cyber safety
Fantom [35]

Answer:

?????

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following is a narrative essay most like
    8·2 answers
  • This activity will help you meet these educational goals:
    7·2 answers
  • PLEASE HELP ME ASP<br> An ISDN carries a signal in digital form.<br><br> True<br><br> False
    12·2 answers
  • Technician A says that to cover all possible vehicle conditions, coolant must have a high freezing point. Technician B says cool
    6·2 answers
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • The purpose of a software design is to enable programmers to implement the requirements by designating the projected parts of th
    14·1 answer
  • An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
    6·1 answer
  • Project: Math Tutor Program with Error Handling
    9·2 answers
  • Why was it important for the date format to be standardized by the
    7·1 answer
  • which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) short
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!