program interest; uses crt; { This program will ask for a starting amount of money, the rate at which it will grow, and the number of years it will be growing. Then, it will calculate how much money you will have after that amount of time. by } var money,rate : real; time,x : integer; quit : char; begin repeat; clrscr; write ('What is the starting amount of money that you are going to invest? ---> '); readln (money); writeln; write ('What is the rate at which it is growing per year? (in percent form) ---> '); readln (rate); writeln; write ('And finally, how many years is it gaining interest? ---> '); readln (time); writeln; writeln; rate := rate / 100; for x := 1 to time do money := money * (1 + rate); writeln ('At the end of ',time,' years, you will have $',money:0:2); writeln; writeln; write ('Do you want to quit? (please type Y or N) ---> '); quit := readkey; quit := upcase(quit); until quit = 'Y'; end.