repeat until loop help

Im a beginner and i got a problem with repeat until loop
I want to know what exactly is supposed to happen in this little program :

program looptest;
Uses Crt;
Var YN : String;

Writeln('Y(YES) or N(NO)?');
Repeat {repeat the code for at least one time}
YN := Readkey ;
If YN = 'y' then Halt; {Halt - exit}
If YN = 'n' then Writeln('Why not? Exiting...');
Delay(1800); { wait a second plus 800 milliseconds }
Until (YN = 'y') OR (YN = 'n');

thanks very much...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!