Hi All
I'm facing problem to understand loops. what is the use of loops or why do we use By increment in Do loop?
(i) I have a dataset which has a value of 7000 and I have to determine the value after 15 years by the constant annual interest rate of 12% and
(ii) compound annual interest rate 12%.
I was trying with this code but I think it's incorrect.
data deposit;
amount = 7000;
rate = 0.12;
do year = 1 to 15;
amount + earned;
earned + (amount*0.12);
principal = amount + earned;
output;
end;
run;