clear; clc;

balance = 100;
r = 0.1;
goal = 200;
n = 0;

while balance < goal
    balance = balance * (1 + r);
    n = n + 1; 
end
disp("Balance = " + balance);
disp("Holding years = " + n);