program loops;
uses crt;

{--------------------------------------------------------------------------

FOR - good good for repeating similar tasks for a specified number of times.

REPEAT - UNTIL and WHILE - best for doing a task until a certain condition
is true or false.

                        by 

--------------------------------------------------------------------------}


VAR         x:longint;
            y:integer;
            z:char;
            name:string[25];
begin

clrscr;
textcolor (7);
write ('Hello. What''s your name? --->  ');
readln (name);

for x := 1 to 10 do writeln (name);
readkey;


x := 0;
y := 0;
repeat
textcolor (y);
x := x + 1;
writeln (x);
y := y + 1;
if y > 15 then y := 0;
until keypressed;

end.