Loading...

Can u help me fix t… - QuestionCove
OpenStudy (anonymous):

Can u help me fix the error in this program: it should calculate the population of country for the next 3 years, assuming it starts with 1000 people in 2012, and the number of people increases by 10% each year. This is what i have http://pastebin.com/gXFXXDQ6 but it gives me 100 not 1100 for year 2013

5 years ago
OpenStudy (anonymous):

populationIn2012 = 1000 populationIn2013 = populationIn2012 + populationIn2012 * 0.1 populationIn2014 = populationIn2013 + populationIn2013 * 0.1 populationIn2015 = populationIn2014 + populationIn2014 * 0.1

5 years ago
OpenStudy (anonymous):

Great. TY compute. And would it be possible do the same thing by changing just ONE character from populationIn2013 = populationIn2012 * 0.1 to print 1100?

5 years ago
OpenStudy (anonymous):

change to populationin2013 = population2012 * 1.1 and the others consecutively

5 years ago
OpenStudy (anonymous):

TY agrj

5 years ago
Similar Questions: