Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
"increase by 1.5%" means multiplying by 1.015, so either you do that in a loop, our you use maths and say that after n years, the population will be (100 * 1.015^n), check out Math.Pow for that. If you want to calculate backwards, you will need to divide by 1.015, that is to say that n years backwards in time the population will be (100 * (1/1.015)^n).
6th Nov 2016, 12:27 PM
Schindlabua
Schindlabua - avatar