Question

California has a population of 39 million and is declining by 3% per year. Texas has...

California has a population of 39 million and is declining by 3% per year. Texas has a population of 29 million and is increasing by 1% per year. How many years will it be until TX has more people that CA? Write a program in Java that answers this question.

Homework Answers

Answer #1

public class Main
{
   public static void main(String[] args) {
       int pop_CA=39000000; //population of california
       int pop_TX=29000000; //population of texas
       int yr=0;
       while(pop_CA>pop_TX){
       pop_CA=pop_CA-3/100*pop_CA; //decrease by 3%
       pop_TX=pop_TX+pop_TX/100; //decrease by 1%
       yr+=1;
       }
      
       System.out.println(yr);
   }
}

OUTPUT:-

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The population of a city is 133​,000. If the population is declining continuously by 2.1​% per​...
The population of a city is 133​,000. If the population is declining continuously by 2.1​% per​ year, in how many years will the city be losing 1170 people per​ year?
The bear population in a certain region has been declining at a continuous rate of 5%...
The bear population in a certain region has been declining at a continuous rate of 5% per year. In 2012 there were 764 bears counted in the area. a) Write a function f(t) that models the number of bears t years after 2012. b) What is the population of bears predicted to be in 2020?
QUESTION 3 How many years did it take for the world's population to go from one...
QUESTION 3 How many years did it take for the world's population to go from one billion to two billion? 60 years 30 years 130 years 16 years 6 points    QUESTION 4 Human population growth ____________. is about the same worldwide tends to exhibit a J-shaped curve (exponential growth) in economically underdeveloped countries is increasing rapidly in Europe is declining overall 6 points    QUESTION 5 Which of the following scenarios would exemplify a density-independent population regulation factor? Rainbow...
A town's population has been increasing. In 2001 the population was 38000 people. By 2011 the...
A town's population has been increasing. In 2001 the population was 38000 people. By 2011 the population had grown to 45000 . A write an equation that models this situation. Let p(t)=mt +b be the form . B) how many people will be living in the town by 2018? C) when will the population reach 100000 people at this rate? Round to the nearest year?
Torrance Refinery produces approximately 20.3 Million barrels of gasoline per year. A California distributor sources its...
Torrance Refinery produces approximately 20.3 Million barrels of gasoline per year. A California distributor sources its gasoline from the Torrance refinery. The annual demand for gasoline at the California distributor is 10.5 Million barrels. The cost of storing gasoline is approximately $22 per barrel (per year). The cost of placing an order to the Torrance refinery (including shipping) is $7700 per order. Orders will be received gradually instead of delivered all at once (hence EPQ). a) At what quantity will...
Singleton is a booming city with lots of single people. It has a population of 3...
Singleton is a booming city with lots of single people. It has a population of 3 million, but since most of the people are single, the population is only growing at a rate of 0.4% each year. The nearby Babysville is a smaller city with a population of only 1.5 million, but because most of the people there love babies, the population is growing at a rate of 2.1% per year. How long will it take for the population of...
1)    Electricity use per capita is lower in California than in most of the U.S.,...
1)    Electricity use per capita is lower in California than in most of the U.S., and has been growing slower in California over the past thirty years than in most of the country. You have been hired to advise a different state or country on how to improve energy efficiency. Drawing on the experience in California, what do you recommend? (Be sure to state WHICH state or country you are advising!). 2) Provide intuition. Under the Hotelling model of...
Requirement 1a. A. In​ 2000, the population of a country was approximately 5.63 million and by...
Requirement 1a. A. In​ 2000, the population of a country was approximately 5.63 million and by 2060 it is projected to grow to 11 million. Use the exponential growth model A=A0 ekt in which t is the number of years after 2000 and A0 is in​ millions, to find an exponential growth function that models the data. B. By which year will the population be 7 million? Requirement 1b. The exponential models describe the population of the indicated​ country, A,...
A bank has two, 3-year commercial loans with a present value of $70 million. The first...
A bank has two, 3-year commercial loans with a present value of $70 million. The first is a $30 million loan that requires a single payment of $37.8 million in 3 years, with no other payments until then. The second is for $40 million. It requires an annual interest payment of $4 million. The principal of $40 million is due in 3 years. The general level of interest rates is 6%. What is the duration of the bank’s commercial loan...
Two cities each have a population of 1.2 million people. City A is growing by a...
Two cities each have a population of 1.2 million people. City A is growing by a factor of 1.13 every 10 years, while city B is decaying by a factor of 0.84 every 10 years. a. Write an exponential function for each city′s population and after t years. PA(t) = Edit millions PB(t) = Edit millions b. Generate a table of values for t = 0 to t = 50, using 10-year intervals, then sketch a graph of each town's...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT