//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
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.
Var ar:array[1..10] of integer;
i,k1,k2,k3:integer;
begin;
randomize;
k2:=1;
writeln('Array:');
for i:=1 to 10 do
begin;
ar[i]:=random(10);
write(ar[i]:4);
if odd(i) then k2:=k2*ar[i] else k1:=k1+ar[i];
if ar[i]>3 then inc(k3);
end;
writeln;
writeln('1:',k1);
writeln('2:',k2);
writeln('3:',k3);
end.
Var a,c,l,w1,w2,w3 : longint;begin readln(a,c); w1:=0; w2:=0; w3:=0; l:=a mod 10; while a>0 do begin if a mod 10=c then w1:=w1+1; if a mod 10=l then w2:=w2+1; if a mod 2=0 then w3:=w3+1; a:=a div 10; end; writeln(w1,' ',w2,' ',w3);<span>end.
</span>