Нарисовать ежика — Pascal(Паскаль)

 Uses
    Crt;
Const
     Width = 20;
     Height = 5;
     Igel: Array[1..Height] of String[Width] =
     ('00010101010110000000',
      '00011111111111100000',
      '00101111110111000000',
      '00011111100010000111',
      '01111111000001111101');
Var
   X,Y: Integer;
begin
 ClrScr;
 TextColor(15);
 for Y := 1 to Height
 do for X := 1 to Width
    do begin
       GotoXY(2+X,2+Y);
       if Igel[Y,X] = '1' then Write(#219);
       end;
 ReadLn;
end.

Leave a Comment

− 1 = 1