Uses CRT; Const nmax=40; mmax=40; var a,b:array[1..nmax,1..mmax] of integer; i,j,n,m:integer; begin ClrScr; repeat write('N:='); Readln(n); until n in [1..nmax]; repeat write('M:='); Readln(m); until m in [1..mmax]; writeln('Исходный массив: '); randomize; for i:=1 to n do begin for j:=1 to m do begin a[i,j]:=random(10)-3; write(a[i,j]:5); b[i,j]:=a[i,j]*a[i,j]*a[i,j]; end; writeln; end; writeln('Результирующий массив: '); for i:=1 to n do begin for j:=1 to m do begin write(b[i,j]:5); end; writeln; end; readkey end.
Робот:
var canvas = document.getElementById('cl');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'orange';
ctx.fillRect(25, 0, 10, 10);
ctx.fillStyle = 'blue';
ctx.fillRect(27, 2, 2, 2);
ctx.fillRect(31, 2, 2, 2);
ctx.fillStyle = 'purple';
ctx.fillRect(29, 10, 2, 5);
ctx.fillStyle = 'black';
ctx.fillRect(15, 15, 30, 2);
ctx.fillStyle = 'grey';
ctx.fillRect(22.5, 15, 15, 20);
ctx.fillStyle = 'green';
ctx.fillRect(22.5, 35, 2, 15);
ctx.fillRect(35.5, 35, 2, 15);
Стикмэн:
ctx.fillStyle = 'black';
ctx.strokeRect(25, 50, 10, 10);
ctx.fillStyle = 'blue';
ctx.fillRect(29, 60, 2, 28);
ctx.beginPath();
ctx.lineWidth="2";
ctx.strokeStyle="black";
ctx.moveTo(29,70);
ctx.lineTo(40,62);
ctx.stroke();
ctx.beginPath();
ctx.lineWidth="2";
ctx.strokeStyle="black";
ctx.moveTo(30,70);
ctx.lineTo(20,62);
ctx.stroke();
ctx.beginPath();
ctx.lineWidth="2";
ctx.strokeStyle="black";
ctx.moveTo(30,86);
ctx.lineTo(20,95);
ctx.stroke();
ctx.beginPath();
ctx.lineWidth="2";
ctx.strokeStyle="black";
ctx.moveTo(29,86);
ctx.lineTo(40,95);
ctx.stroke();
И да,надеюсь ты разбираешься в Javascript`е и знаешь что как.