% interest.m
%
%  How many years til a $1 bank account becomes $1,000,000?
%
amount = 1.00;
year = 2017;
while ( amount < 1000000 )
  year = year + 1;
  amount = 1.012 * amount;
end
fprintf ( 'Year %d, I have $%12.2f\n', year, amount );
