(*Cathy Ngai F.4AS(24) *)
(*the purpose of this program is to calculate the compound interest *)


program CompoundInterest;
uses wincrt;
var  Pin, Ra, A : real;
     T, I : integer;

begin
  write('What is the principal?');
  readln(Pin );
  write('What is interest rate?');
  readln(Ra);
  write('How many years?');
  readln(T);
  writeln;
  writeln('year      amount':8);

  A:= Pin ;
  for I:= 1 to T do
  begin
  A:= A*(1+Ra/100);
  writeln(I, '        ', A:8:2)
  end;

end.


    Source: geocities.com/hk/cathy_740

               ( geocities.com/hk)