Al-salam alekom..
sorry I couldnot write it in arabic.
I was given a samll program in turbo pascal 7, with the following text:
Program Banks;
{uses wincrt;}
var num,n,year: integer;
name :string[30];
k,kn,rate,i:real;
Begin
writeln ('account number ',num);
readln (num);
begin
repeat
writeln('inter name of client', name);
readln(name);
writeln('inter value of deposite ', k);
readln(k);
n:=0;
repeat
if k<=50000 then i:=0.08
else i:= 0.09;
repeat
n:=n+1;
kn:= k*EXP(n*ln(1+i));
rate:=kn-k;
until (kn>=2*k);
year:=1995+n;
writeln ('account number: ',num);
writeln ('client name: ',name);
writeln ('deposite money= ',k:5:1);
writeln ('exact amount of money in the account ',kn:5:1);
writeln ('rate= ',rate:5:1);
writeln ('enter next account number');
readln(num);
until(num<0);
until(name = exit);
writeln;
readln;
end;
end.we have here 3 (repeat,until) loops, the first (repeat) dont have its own (until),
so I typed the following :
until(name=exit);
so the compiler gives an erorr, any suggestion to solve the problem.
when Disabling the first(repeat) the program only runs for 1 correct time, and after the command writeln('enter next account number');
it will mix everything.
any help plz.