In 2009 there were 150,000 islanders.
The birth rate is estimated at 0.7% per year.
The death rate is estimated at 0.6% per year.
1900 people immigrate to the island each year.
1800 people emigrate from the island each year.
Write a program to calculate the estimated population of the Island at the beginning of a particular year. The year in question should be requested from the user.
This is what i have written so far and am not sure why it isnt't working:
var year = parseInt(prompt( "Enter a year to see population(from 2009 - onwards): ",2009));
var standardYr = 150000;
var calculation = year - 2009;
for( var x = 1; x <= calculation; x++)
var newStandardYr = newStandardYr + 100 + (standardYr * 0.1)
var calc = newStandardYr + standardYr;
var convert = calc.toString();
if(year == 2009)
Any help would be appreciated