//Pascal ABC.NET 3.1 сборка 1256
uses
GraphABC;
Var
n:integer;
procedure square(var n:integer);
begin
readln(n);
rectangle(window.Center.X-n div 2,window.Center.Y-n div 2,window.Center.X+n div 2,window.Center.Y+n div 2);
end;
procedure points(n:integer);
Var
x,y,i:integer;
begin
i:=0;
while i<1000 do<br> begin
x:=random(window.Center.X-n div 2+1,window.Center.X+n div 2-1);
y:=random(window.Center.Y-n div 2+1,window.Center.Y+n div 2-1);
setpixel(x,y,rgb(random(255),random(255),random(255)));
inc(i);
end;
end;
begin
randomize;
square(n);
points(n);
end.