Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume that the population of Mexico is 1 2 8 million and the population of the United States is 3 2 3 million. Write a
Assume that the population of Mexico is million and the population of the United States is million. Write a program called Population that accepts two values from a user: an assumption of an annual increase in the population of Mexico and an assumption for an annual decrease in the US population. Accept both figures as percentages; in other words, a percent decrease is entered as Write an application that displays the populations of the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.
An example of the program is shown below:
Enter the percent annual increase for Mexico population
Enter as a decimal.
For example, is entered as
Enter the value
Enter the percent annual decrease for US population
Enter as a decimal.
For example, is entered as
Enter the value
Mexico population US Population
million million
million million
million million
million million
The population of Mexico will exceed the US population in years
The population of Mexico will be million
and the population of the US will be million
info The program's output is too large to include, so it has been condensed in the example above.
info Make sure to include "The population of Mexico will exceed the US population in X years", where X is the number of years, in the program's output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started