Нарисовать рисунок - PascalABC.NET

Узнай цену своей работы

Формулировка задачи:

Всем доброго времени суток! прошу помощи. Дали задание "нарисовать рисунок в Pascal"

Решение задачи: «Нарисовать рисунок»

textual
Листинг программы
uses GraphABC;
const h = 20;winWidth = 15;winHeight = 14;
 
procedure ver(x,y:integer); forward;
 
procedure hor(x,y:integer);
begin
  rectangle(x,y,x+h*6+1,y+h+1);if y+h*6+1 < window.Height then ver(x,y+h*6);
end;
 
procedure ver(x,y:integer);
begin
  rectangle(x,y,x+h+1,y+h*7+1);if y+h*7+1 < window.Height then hor(x,y+h*7);
end;
 
begin
  Window.Width := h*winWidth;
  Window.Height := h*winHeight;
  var(x,y):=(-h*7,-h*6);
  repeat ver(x,y);x+=h;y-=h; until x>window.Height;
end.

Оцени полезность:

13   голосов , оценка 3.923 из 5