program maja;
uses graph;
{$i graafika.pas}
var i, j: integer;

procedure aken(x, y, laius, korgus: integer);
begin
 line(x, y, x, y+korgus);                        {korteri raam}
 line(x, y+korgus, x+laius, y+korgus);
 line(x+laius, y+korgus, x+laius, y);
 line(x+laius, y, x, y);

 line(round(x+laius*0.25), round(y+korgus*0.25), {suur aken}
      round(x+laius*0.75), round(y+korgus*0.25));
 line(round(x+laius*0.75), round(y+korgus*0.25),
      round(x+laius*0.75), round(y+korgus*0.75));
 line(round(x+laius*0.75), round(y+korgus*0.75),
      round(x+laius*0.25), round(y+korgus*0.75));
 line(round(x+laius*0.25), round(y+korgus*0.75),
      round(x+laius*0.25), round(y+korgus*0.25));


 line(round(x+laius*0.5), round(y+korgus*0.25),
      round(x+laius*0.5), round(y+korgus*0.75));
end;

procedure uks(x, y, laius, korgus: integer);
begin
 line(x, y, x, y+korgus);                        {korteri raam}
 line(x, y+korgus, x+laius, y+korgus);
 line(x+laius, y+korgus, x+laius, y);
 line(x+laius, y, x, y);

 line(round(x+laius*0.25), round(y+korgus*0.25),
      round(x+laius*0.5), round(y+korgus*0.25));
 line(round(x+laius*0.5), round(y+korgus*0.25),
      round(x+laius*0.5), y+korgus);
 line(round(x+laius*0.25), round(y+korgus*0.25),
      round(x+laius*0.25), y+korgus);
end;




begin
 KaivitaGraafika;
 for i:=0 to 15 do begin
 uks(60+30*i, 420, 30, 30);
     for j:=0 to 9 do
     aken(60+30*i, 400-20*j, 30, 20);
 end;
 readln;
end .